1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

add window option: always on top of other windows (#257)

* add window option: always on Top

* updated jslib

* changes requested
This commit is contained in:
Tobirexy
2019-06-03 14:31:47 +02:00
committed by Kyle Spearrin
parent 50d2bab81b
commit dbdf1daeed
3 changed files with 16 additions and 4 deletions

2
jslib

Submodule jslib updated: 38fc0432c3...18d267933b

View File

@@ -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"

View File

@@ -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);
}