Merge branch 'release/v1.2' of https://github.com/ONLYOFFICE/AppServer into release/v1.2

This commit is contained in:
Maria Sukhova 2022-06-02 13:22:46 +03:00
commit 2b63336d62
2 changed files with 17 additions and 10 deletions

View File

@ -25,6 +25,8 @@ import CloseIcon from "../../../../public/images/close-icon.react.svg";
const StyledButtonAlertIcon = styled(ButtonAlertIcon)`
${commonIconsStyles}
`;
const Delay = 1000;
const FloatingButton = ({ id, className, style, ...rest }) => {
const {
icon,
@ -41,14 +43,17 @@ const FloatingButton = ({ id, className, style, ...rest }) => {
clearUploadedFilesHistory && clearUploadedFilesHistory();
};
let timerId = null;
useEffect(() => {
if (percent === 100) {
setTimeout(() => {
setAnimationCompleted(true);
}, 1000);
} else {
setAnimationCompleted(false);
}
timerId = setTimeout(
() => setAnimationCompleted(percent === 100 ? true : false),
Delay
);
return () => {
clearTimeout(timerId);
};
}, [percent, setAnimationCompleted]);
return (

View File

@ -631,6 +631,7 @@ class ContextOptionsStore {
};
getGroupContextOptions = (t) => {
const { personal } = this.authStore.settingsStore;
const { selection } = this.filesStore;
const { setDeleteDialogVisible } = this.dialogsStore;
const { isRecycleBinFolder } = this.treeFoldersStore;
@ -639,9 +640,10 @@ class ContextOptionsStore {
selection.findIndex((k) => k.contextOptions.includes("download-as")) !==
-1;
const sharingItems = selection.filter(
(k) => k.contextOptions.includes("sharing-settings") && k.canShare
).length;
const sharingItems =
selection.filter(
(k) => k.contextOptions.includes("sharing-settings") && k.canShare
).length && !personal;
const favoriteItems = selection.filter((k) =>
k.contextOptions.includes("mark-as-favorite")