mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
alwaysOnTop
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 38fc0432c3...3d93696fb5
@@ -569,6 +569,10 @@
|
|||||||
"hideToTray": {
|
"hideToTray": {
|
||||||
"message": "Hide to Tray"
|
"message": "Hide to Tray"
|
||||||
},
|
},
|
||||||
|
"alwaysOnTop": {
|
||||||
|
"message": "Always on Top",
|
||||||
|
"description": "Application window should always stay on top of other windows"
|
||||||
|
},
|
||||||
"hideToMenuBar": {
|
"hideToMenuBar": {
|
||||||
"message": "Hide to Menu Bar"
|
"message": "Hide to Menu Bar"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -48,11 +48,19 @@ export class MenuMain extends BaseMenu {
|
|||||||
template[template.length - 1].submenu = this.macWindowSubmenuOptions;
|
template[template.length - 1].submenu = this.macWindowSubmenuOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
(template[template.length - 1].submenu as MenuItemConstructorOptions[]).splice(1, 0, {
|
(template[template.length - 1].submenu as MenuItemConstructorOptions[]).splice(1, 0,
|
||||||
label: this.main.i18nService.t(process.platform === 'darwin' ? 'hideToMenuBar' : 'hideToTray'),
|
{
|
||||||
click: () => this.main.messagingService.send('hideToTray'),
|
label: this.main.i18nService.t(process.platform === 'darwin' ? 'hideToMenuBar' : 'hideToTray'),
|
||||||
accelerator: 'CmdOrCtrl+Shift+M',
|
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);
|
this.menu = Menu.buildFromTemplate(template);
|
||||||
Menu.setApplicationMenu(this.menu);
|
Menu.setApplicationMenu(this.menu);
|
||||||
|
|||||||
Reference in New Issue
Block a user