Merge branch 'release/rc-v1.2.0' of https://github.com/ONLYOFFICE/DocSpace into release/rc-v1.2.0

This commit is contained in:
Viktor Fomin 2023-02-01 19:02:39 +03:00
commit 95395f1f1e
3 changed files with 16 additions and 3 deletions

View File

@ -191,6 +191,7 @@ class ImageViewer extends React.Component {
audioIcon,
headerIcon,
onSetSelectionFile,
onDownloadClick,
} = this.props;
const generateContextMenu = (isOpen, right, bottom) => {
@ -351,7 +352,7 @@ class ImageViewer extends React.Component {
button.onClick = this.props.onDeleteClick;
break;
case "download":
button.onClick = this.props.onDownloadClick;
button.onClick = onDownloadClick;
break;
default:
break;
@ -386,6 +387,7 @@ class ImageViewer extends React.Component {
onMaskClick={onClose}
onNextClick={onNextClick}
onPrevClick={onPrevClick}
onDownloadClick={onDownloadClick}
playlist={playlist}
playlistPos={playlistPos}
customToolbar={() => toolbars}

View File

@ -13,6 +13,7 @@ import IconVolumeMin from "PUBLIC_DIR/images/media.volumemin.react.svg";
import IconFullScreen from "PUBLIC_DIR/images/videoplayer.full.react.svg";
import IconExitFullScreen from "PUBLIC_DIR/images/videoplayer.exit.react.svg";
import MediaContextMenu from "PUBLIC_DIR/images/vertical-dots.react.svg";
import DownloadReactSvgUrl from "PUBLIC_DIR/images/download.react.svg";
import Icon1x from "PUBLIC_DIR/images/media.viewer1x.react.svg";
import Icon05x from "PUBLIC_DIR/images/media.viewer05x.react.svg";
@ -354,6 +355,8 @@ export default function ViewerPlayer(props) {
globalTimer,
videoControls,
setIsOpenContextMenu,
contextModel,
onDownloadClick,
} = props;
const localStorageVolume = localStorage.getItem("player-volume");
@ -918,6 +921,9 @@ export default function ViewerPlayer(props) {
contextBottom
);
const model = contextModel();
const hideContextMenu = model.filter((item) => !item.disabled).length <= 1;
let iconLeft =
state.deltaX && isMobileOnly
? (window.innerWidth - iconWidth) / 2 + state.left + "px"
@ -1114,7 +1120,7 @@ translateX(${state.left !== null ? state.left + "px" : "auto"}) translateY(${
</div>
)}
{!isMobileOnly && !props.isPreviewFile && (
{!isMobileOnly && !props.isPreviewFile && !hideContextMenu && (
<div
className="controller context-menu-wrapper"
onClick={toggleContext}
@ -1124,6 +1130,11 @@ translateX(${state.left !== null ? state.left + "px" : "auto"}) translateY(${
{contextMenu}
</div>
)}
{hideContextMenu && (
<div className="controller" onClick={onDownloadClick}>
<DownloadReactSvgUrl />
</div>
)}
</div>
</div>
</StyledVideoActions>

View File

@ -555,7 +555,7 @@ public class FileSharing
Id = id,
Link = _roomLinkService.GetInvitationLink(id, _authContext.CurrentAccount.ID),
SubjectGroup = true,
Access = FileShare.Restrict,
Access = FileShare.Read,
Owner = false
};