1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-05 23:53:21 +00:00

alwaysOnTop

This commit is contained in:
Kyle Spearrin
2019-06-03 08:41:19 -04:00
parent b51d279ba6
commit ff8422d6c1
3 changed files with 18 additions and 6 deletions

2
jslib

Submodule jslib updated: 38fc0432c3...3d93696fb5

View File

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

View File

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