diff --git a/jslib b/jslib index 38fc0432c3..18d267933b 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 38fc0432c3b352628b0114ac98b49ca69ee01675 +Subproject commit 18d267933bbf02475e39e6c47c1bc59f3873dfe9 diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 1503155797..1f031fbf08 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -1143,6 +1143,10 @@ "hideToTray": { "message": "Hide to Tray" }, + "alwaysOnTop": { + "message": "Always on Top", + "description": "Bitwarden window should always stay on top of other windows" + }, "dateUpdated": { "message": "Updated", "description": "ex. Date this item was updated" diff --git a/src/main/menu.main.ts b/src/main/menu.main.ts index 1246ea3a95..f9b83d04cc 100644 --- a/src/main/menu.main.ts +++ b/src/main/menu.main.ts @@ -441,12 +441,20 @@ export class MenuMain extends BaseMenu { (template[template.length - 1].submenu as MenuItemConstructorOptions[]).concat(aboutMenuAdditions); } - (template[template.length - 2].submenu as MenuItemConstructorOptions[]).splice(1, 0, { + (template[template.length - 2].submenu as MenuItemConstructorOptions[]).splice(1, 0, + { label: this.main.i18nService.t(process.platform === 'darwin' ? 'hideToMenuBar' : 'hideToTray'), click: () => this.main.messagingService.send('hideToTray'), accelerator: 'CmdOrCtrl+Shift+M', - }); - + }, + { + type: 'checkbox', + label: this.main.i18nService.t('alwaysOnTop'), + checked: this.windowMain.win.isAlwaysOnTop(), + click: () => this.main.windowMain.toggleAlwaysOnTop(), + accelerator: 'CmdOrCtrl+Shift+T', + }, + ); this.menu = Menu.buildFromTemplate(template); Menu.setApplicationMenu(this.menu); }