Web:Client:Store:ContextOptionsStore Fixed double separator in the file context menu
This commit is contained in:
parent
d66777b221
commit
9e4ccb56bc
@ -466,6 +466,17 @@ class ContextOptionsStore {
|
||||
|
||||
const isMedia = this.settingsStore.isMediaOrImage(item.fileExst);
|
||||
const isCanWebEdit = this.settingsStore.canWebEdit(item.fileExst);
|
||||
const hasInfoPanel = contextOptions.includes("show-info");
|
||||
|
||||
const emailSendIsDisabled = true;
|
||||
const showSeparator0 = hasInfoPanel || !isMedia || !emailSendIsDisabled;
|
||||
|
||||
const separator0 = showSeparator0
|
||||
? {
|
||||
key: "separator0",
|
||||
isSeparator: true,
|
||||
}
|
||||
: false;
|
||||
|
||||
const blockAction = isCanWebEdit
|
||||
? {
|
||||
@ -641,10 +652,7 @@ class ContextOptionsStore {
|
||||
onClick: () => this.onClickMakeForm(item, t),
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
key: "separator0",
|
||||
isSeparator: true,
|
||||
},
|
||||
separator0,
|
||||
{
|
||||
key: "reconnect-storage",
|
||||
label: t("Common:ReconnectStorage"),
|
||||
@ -717,7 +725,7 @@ class ContextOptionsStore {
|
||||
key: "send-by-email",
|
||||
label: t("SendByEmail"),
|
||||
icon: "/static/images/mail.react.svg",
|
||||
disabled: true,
|
||||
disabled: emailSendIsDisabled,
|
||||
},
|
||||
...versionActions,
|
||||
{
|
||||
@ -885,7 +893,7 @@ class ContextOptionsStore {
|
||||
|
||||
deleteRooms,
|
||||
} = this.filesActionsStore;
|
||||
|
||||
|
||||
if (isRoomsFolder || isArchiveFolder) {
|
||||
const isPinOption = selection.filter((item) => !item.pinned).length > 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user