Web: Files : Body : Fixed context options

This commit is contained in:
Ilya Oleshko 2020-11-12 12:30:30 +03:00
parent 296901f7a8
commit 6f24bbf5da
2 changed files with 11 additions and 5 deletions

View File

@ -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 {

View File

@ -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");
}