diff --git a/src/main/menu.bitwarden.ts b/src/main/menu.bitwarden.ts index 54d421de..e5a1cfbc 100644 --- a/src/main/menu.bitwarden.ts +++ b/src/main/menu.bitwarden.ts @@ -16,22 +16,33 @@ export class BitwardenMenu implements IMenubarMenu { readonly label: string = "Bitwarden"; get items(): MenuItemConstructorOptions[] { - return [ - this.aboutBitwarden, - this.checkForUpdates, - this.separator, - this.settings, - this.lock, - this.lockAll, - this.logOut, - this.services, - this.separator, - this.hideBitwarden, - this.hideOthers, - this.showAll, - this.separator, - this.quitBitwarden, - ]; + const items = [this.aboutBitwarden, this.checkForUpdates]; + if (this.aboutBitwarden.visible === true || this.checkForUpdates.visible === true) { + items.push(this.separator); + } + items.push(this.settings); + items.push(this.lock); + items.push(this.lockAll); + items.push(this.logOut); + items.push(this.services); + + if ( + this.hideBitwarden.visible === true || + this.hideOthers.visible === true || + this.showAll.visible === true + ) { + 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; diff --git a/src/main/menu.window.ts b/src/main/menu.window.ts index 35867d3a..d565b7ee 100644 --- a/src/main/menu.window.ts +++ b/src/main/menu.window.ts @@ -16,6 +16,10 @@ export class WindowMenu implements IMenubarMenu { } get items(): MenuItemConstructorOptions[] { + if (!isMacAppStore()) { + return [this.hideToMenu, this.alwaysOnTop]; + } + return [ this.minimize, this.hideToMenu,