1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-06-26 10:36:19 +02: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

@ -1 +1 @@
Subproject commit 38fc0432c3b352628b0114ac98b49ca69ee01675
Subproject commit 18d267933bbf02475e39e6c47c1bc59f3873dfe9

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