Fix menu separators (#1220)
* Fix separators appearing when they shouldn't * Use const instead of let
This commit is contained in:
parent
695e8389d8
commit
d64b00977c
|
@ -16,22 +16,33 @@ export class BitwardenMenu implements IMenubarMenu {
|
||||||
readonly label: string = "Bitwarden";
|
readonly label: string = "Bitwarden";
|
||||||
|
|
||||||
get items(): MenuItemConstructorOptions[] {
|
get items(): MenuItemConstructorOptions[] {
|
||||||
return [
|
const items = [this.aboutBitwarden, this.checkForUpdates];
|
||||||
this.aboutBitwarden,
|
if (this.aboutBitwarden.visible === true || this.checkForUpdates.visible === true) {
|
||||||
this.checkForUpdates,
|
items.push(this.separator);
|
||||||
this.separator,
|
}
|
||||||
this.settings,
|
items.push(this.settings);
|
||||||
this.lock,
|
items.push(this.lock);
|
||||||
this.lockAll,
|
items.push(this.lockAll);
|
||||||
this.logOut,
|
items.push(this.logOut);
|
||||||
this.services,
|
items.push(this.services);
|
||||||
this.separator,
|
|
||||||
this.hideBitwarden,
|
if (
|
||||||
this.hideOthers,
|
this.hideBitwarden.visible === true ||
|
||||||
this.showAll,
|
this.hideOthers.visible === true ||
|
||||||
this.separator,
|
this.showAll.visible === true
|
||||||
this.quitBitwarden,
|
) {
|
||||||
];
|
items.push(this.separator);
|
||||||
|
}
|
||||||
|
|
||||||
|
items.push(this.hideBitwarden);
|
||||||
|
items.push(this.hideOthers);
|
||||||
|
items.push(this.showAll);
|
||||||
|
|
||||||
|
if (this.quitBitwarden.visible === true) {
|
||||||
|
items.push(this.separator);
|
||||||
|
}
|
||||||
|
items.push(this.quitBitwarden);
|
||||||
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly _i18nService: I18nService;
|
private readonly _i18nService: I18nService;
|
||||||
|
|
|
@ -16,6 +16,10 @@ export class WindowMenu implements IMenubarMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
get items(): MenuItemConstructorOptions[] {
|
get items(): MenuItemConstructorOptions[] {
|
||||||
|
if (!isMacAppStore()) {
|
||||||
|
return [this.hideToMenu, this.alwaysOnTop];
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
this.minimize,
|
this.minimize,
|
||||||
this.hideToMenu,
|
this.hideToMenu,
|
||||||
|
|
Loading…
Reference in New Issue