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:
parent
50d2bab81b
commit
dbdf1daeed
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 38fc0432c3b352628b0114ac98b49ca69ee01675
|
Subproject commit 18d267933bbf02475e39e6c47c1bc59f3873dfe9
|
|
@ -1143,6 +1143,10 @@
|
||||||
"hideToTray": {
|
"hideToTray": {
|
||||||
"message": "Hide to Tray"
|
"message": "Hide to Tray"
|
||||||
},
|
},
|
||||||
|
"alwaysOnTop": {
|
||||||
|
"message": "Always on Top",
|
||||||
|
"description": "Bitwarden window should always stay on top of other windows"
|
||||||
|
},
|
||||||
"dateUpdated": {
|
"dateUpdated": {
|
||||||
"message": "Updated",
|
"message": "Updated",
|
||||||
"description": "ex. Date this item was updated"
|
"description": "ex. Date this item was updated"
|
||||||
|
|
|
@ -441,12 +441,20 @@ export class MenuMain extends BaseMenu {
|
||||||
(template[template.length - 1].submenu as MenuItemConstructorOptions[]).concat(aboutMenuAdditions);
|
(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'),
|
label: this.main.i18nService.t(process.platform === 'darwin' ? 'hideToMenuBar' : 'hideToTray'),
|
||||||
click: () => this.main.messagingService.send('hideToTray'),
|
click: () => this.main.messagingService.send('hideToTray'),
|
||||||
accelerator: 'CmdOrCtrl+Shift+M',
|
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);
|
this.menu = Menu.buildFromTemplate(template);
|
||||||
Menu.setApplicationMenu(this.menu);
|
Menu.setApplicationMenu(this.menu);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue