Web: Files: FilesStore: Fixed empty separator, added missing options after merge

This commit is contained in:
Ilya Oleshko 2021-04-07 11:45:01 +03:00
parent f7553b2343
commit cb4e1677b8

View File

@ -366,6 +366,7 @@ class FilesStore {
isRecycleBinFolder,
isPrivacyFolder,
isRecentFolder,
isShareFolder,
} = this.treeFoldersStore;
if (isRecycleBinFolder) {
@ -405,6 +406,16 @@ class FilesStore {
}
this.canShareOwnerChange(item) && options.push("owner-change");
if (isFile) {
if (canOpenPlayer) {
options.push("view");
} else {
options.push("edit");
options.push("preview");
}
}
options.push("link-for-portal-users");
if (!isVisitor) {
@ -427,14 +438,7 @@ class FilesStore {
options.push("mark-as-favorite");
}
} else {
options.push("separator3");
}
if (canOpenPlayer) {
options.push("view");
} else {
options.push("edit");
options.push("preview");
!isShareFolder && options.push("separator3");
}
options.push("download");
@ -452,14 +456,18 @@ class FilesStore {
isThirdPartyFolder &&
this.userAccess &&
options.push("change-thirdparty-info");
if (this.userAccess) {
options.push("separator3");
this.userAccess && options.push("delete");
options.push("delete");
}
} else {
options.push("copy");
}
}
if (isFavorite && !isRecycleBinFolder) {
!this.userAccess && options.push("separator3");
options.push("remove-from-favorites");
}