Merge branch 'bugfix/context-actions' of https://github.com/ONLYOFFICE/AppServer into bugfix/context-actions
This commit is contained in:
commit
52750c607d
@ -297,9 +297,9 @@ export default function withContextOptions(WrappedComponent) {
|
||||
return {
|
||||
key: option,
|
||||
label: t("Preview"),
|
||||
icon: "EyeIcon",
|
||||
icon: "/static/images/eye.react.svg",
|
||||
onClick: this.onClickLinkEdit,
|
||||
disabled: true,
|
||||
disabled: false,
|
||||
};
|
||||
case "view":
|
||||
return {
|
||||
|
@ -389,13 +389,14 @@ class FilesStore {
|
||||
isCommon,
|
||||
isShare,
|
||||
isFavoritesFolder,
|
||||
isShareFolder,
|
||||
} = this.treeFoldersStore;
|
||||
|
||||
const { isRootFolder } = this.selectedFolderStore;
|
||||
|
||||
const isThirdPartyFolder = item.providerKey && isRootFolder;
|
||||
|
||||
const isShareFolder = isShare(item.rootFolderType);
|
||||
const isShareItem = isShare(item.rootFolderType);
|
||||
const isCommonFolder = isCommon(item.rootFolderType);
|
||||
|
||||
const { isDesktopClient } = this.settingsStore;
|
||||
@ -616,8 +617,18 @@ class FilesStore {
|
||||
fileOptions = this.removeOptions(fileOptions, ["open-location"]);
|
||||
}
|
||||
|
||||
if (isShareFolder) {
|
||||
fileOptions = this.removeOptions(fileOptions, ["move-to", "delete"]);
|
||||
if (isShareItem) {
|
||||
if (!isFullAccess) {
|
||||
fileOptions = this.removeOptions(fileOptions, ["edit"]);
|
||||
}
|
||||
|
||||
if (isShareFolder) {
|
||||
fileOptions = this.removeOptions(fileOptions, [
|
||||
"copy",
|
||||
"move-to",
|
||||
"delete",
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
fileOptions = this.removeOptions(fileOptions, ["unsubscribe"]);
|
||||
}
|
||||
@ -648,11 +659,13 @@ class FilesStore {
|
||||
folderOptions = this.removeOptions(folderOptions, ["copy"]);
|
||||
}
|
||||
|
||||
if (isShareFolder) {
|
||||
folderOptions = this.removeOptions(folderOptions, [
|
||||
"move-to",
|
||||
"delete",
|
||||
]);
|
||||
if (isShareItem) {
|
||||
if (isShareFolder) {
|
||||
folderOptions = this.removeOptions(folderOptions, [
|
||||
"move-to",
|
||||
"delete",
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
folderOptions = this.removeOptions(folderOptions, ["unsubscribe"]);
|
||||
}
|
||||
@ -692,9 +705,12 @@ class FilesStore {
|
||||
"move-to",
|
||||
"delete",
|
||||
"change-thirdparty-info",
|
||||
"separator2",
|
||||
]);
|
||||
|
||||
if (!isShareItem) {
|
||||
folderOptions = this.removeOptions(folderOptions, ["separator2"]);
|
||||
}
|
||||
|
||||
if (isVisitor) {
|
||||
folderOptions = this.removeOptions(folderOptions, ["rename"]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user