Merge branch 'feature/files' of github.com:ONLYOFFICE/AppServer into feature/files

This commit is contained in:
Artem Tarasov 2020-09-22 15:43:15 +03:00
commit 8748a0fc52
5 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "asc-web-common", "name": "asc-web-common",
"version": "1.0.233", "version": "1.0.236",
"description": "Ascensio System SIA common components and solutions library", "description": "Ascensio System SIA common components and solutions library",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"files": [ "files": [

View File

@ -3,6 +3,7 @@ import styled from "styled-components";
const StyledMain = styled.main` const StyledMain = styled.main`
height: 100vh; height: 100vh;
height: calc(var(--vh, 1vh) * 100);
padding: ${props => (props.fullscreen ? "0" : "56px 0 0 0")}; padding: ${props => (props.fullscreen ? "0" : "56px 0 0 0")};
width: 100vw; width: 100vw;
z-index: 0; z-index: 0;
@ -12,6 +13,9 @@ const StyledMain = styled.main`
`; `;
const Main = React.memo(props => { const Main = React.memo(props => {
const vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
//console.log("Main render"); //console.log("Main render");
return <StyledMain {...props} />; return <StyledMain {...props} />;
}); });

View File

@ -1,7 +1,7 @@
import React from "react"; import React from "react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import styled from "styled-components"; import styled from "styled-components";
import { Icons } from "asc-web-components"; import { Icons, Text } from "asc-web-components";
import ImageViewer from "./sub-components/image-viewer" import ImageViewer from "./sub-components/image-viewer"
import VideoViewer from "./sub-components/video-viewer" import VideoViewer from "./sub-components/video-viewer"
@ -352,7 +352,7 @@ class MediaViewer extends React.Component {
<div> <div>
<div className="details" ref={this.detailsContainer}> <div className="details" ref={this.detailsContainer}>
<div className="title">{fileTitle}</div> <Text isBold fontSize="14px" color="#fff" className="title">{fileTitle}</Text>
<ControlBtn onClick={this.props.onClose && (this.props.onClose)} className="mediaPlayerClose"> <ControlBtn onClick={this.props.onClose && (this.props.onClose)} className="mediaPlayerClose">
<Icons.CrossIcon size="medium" isfill={true} color="#fff" /> <Icons.CrossIcon size="medium" isfill={true} color="#fff" />
</ControlBtn> </ControlBtn>

View File

@ -43,10 +43,6 @@ const StyledMediaViewer = styled.div`
} }
.details{ .details{
z-index: 4001; z-index: 4001;
font-size: 14px;
font-weight: bold;
text-align: center;
white-space: nowrap;
padding-top: 14px; padding-top: 14px;
padding-bottom: 14px; padding-bottom: 14px;
height: 20px; height: 20px;
@ -57,8 +53,7 @@ const StyledMediaViewer = styled.div`
left: 0; left: 0;
.title{ .title{
width: calc(100% - 100px); text-align: center;
margin: 0 auto;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@ -31,11 +31,12 @@ const StyledViewer = styled(Viewer)`
} }
.react-viewer-toolbar li{ .react-viewer-toolbar li{
width: 40px; width: 40px;
height:30px; height: 30px;
margin-top: 4px; margin-top: 4px;
border-radius: 2px; border-radius: 2px;
cursor: pointer; cursor: pointer;
line-height: 24px; line-height: 24px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
.react-viewer-btn{ .react-viewer-btn{
background-color: transparent; background-color: transparent;