From 6f24bbf5da58d16508b033cc29367c291352ddca Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Thu, 12 Nov 2020 12:30:30 +0300 Subject: [PATCH] Web: Files : Body : Fixed context options --- .../components/pages/Home/Section/Body/index.js | 1 + .../ASC.Files/Client/src/store/files/selectors.js | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js index 11ca5f5dc6..34f75c06c0 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js +++ b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js @@ -598,6 +598,7 @@ class SectionBodyContent extends React.Component { case "separator0": case "separator1": case "separator2": + case "separator3": return { key: option, isSeparator: true }; case "open-location": return { diff --git a/products/ASC.Files/Client/src/store/files/selectors.js b/products/ASC.Files/Client/src/store/files/selectors.js index ed2b1ef04c..9778094c4c 100644 --- a/products/ASC.Files/Client/src/store/files/selectors.js +++ b/products/ASC.Files/Client/src/store/files/selectors.js @@ -625,13 +625,17 @@ const getFilesContextOptions = ( options.push("separator0"); if (isFile) { - options.push("show-version-history"); - options.push("finalize-version"); - options.push("block-unblock-version"); - options.push("separator1"); + if (!item.providerKey && !canOpenPlayer) { + options.push("show-version-history"); + options.push("finalize-version"); + options.push("block-unblock-version"); + options.push("separator1"); + } + if (isRecent) { options.push("open-location"); } + if (!isFavorite) { options.push("mark-as-favorite"); } @@ -645,7 +649,6 @@ const getFilesContextOptions = ( options.push("download"); } - options.push("move"); options.push("copy"); @@ -654,8 +657,10 @@ const getFilesContextOptions = ( } options.push("rename"); + options.push("separator3"); options.push("delete"); } + if (isFavorite && !isRecycleBin) { options.push("remove-from-favorites"); }