Fix Bug 61275 - Files.Trash.Info. Extra separator line in the file menu in the Info panel.

This commit is contained in:
Alexey Safronov 2023-02-21 13:46:38 +04:00
parent 125a0169cf
commit b362851047

View File

@ -514,7 +514,7 @@ class ContextOptionsStore {
}
}
return options;
return options.filter((o) => !!o);
};
onShowInfoPanel = (item) => {
@ -589,8 +589,8 @@ class ContextOptionsStore {
const hasInfoPanel = contextOptions.includes("show-info");
const emailSendIsDisabled = true;
const showSeparator0 = hasInfoPanel || !isMedia || !emailSendIsDisabled;
//const emailSendIsDisabled = true;
const showSeparator0 = hasInfoPanel || !isMedia; // || !emailSendIsDisabled;
const separator0 = showSeparator0
? {
@ -873,13 +873,13 @@ class ContextOptionsStore {
onClick: () => this.onCopyLink(item, t),
disabled: false,
},
{
id: "option_send-by-email",
key: "send-by-email",
label: t("SendByEmail"),
icon: MailReactSvgUrl,
disabled: emailSendIsDisabled,
},
// {
// id: "option_send-by-email",
// key: "send-by-email",
// label: t("SendByEmail"),
// icon: MailReactSvgUrl,
// disabled: emailSendIsDisabled,
// },
...versionActions,
{
id: "option_show-info",
@ -1048,6 +1048,15 @@ class ContextOptionsStore {
});
}
}
if (options[0]?.isSeparator) {
options.shift();
}
if (options[options.length - 1]?.isSeparator) {
options.pop();
}
return options;
};