mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-17 15:37:57 +01:00
re-organize menu
This commit is contained in:
parent
88ce76a1d5
commit
692e5b7dbc
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bitwarden",
|
"name": "bitwarden",
|
||||||
"productName": "bitwarden",
|
"productName": "Bitwarden",
|
||||||
"description": "A secure and free password manager for all of your devices.",
|
"description": "A secure and free password manager for all of your devices.",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>bitwarden</title>
|
<title>Bitwarden</title>
|
||||||
<base href="">
|
<base href="">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -52,25 +52,15 @@ export class MenuMain {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ type: 'separator' },
|
|
||||||
{
|
{
|
||||||
label: this.i18nService.t('addNewFolder'),
|
label: this.i18nService.t('addNewFolder'),
|
||||||
click: () => self.send('newFolder'),
|
click: () => self.send('newFolder'),
|
||||||
},
|
},
|
||||||
{ type: 'separator' },
|
{ type: 'separator' },
|
||||||
{
|
|
||||||
label: this.i18nService.t('settings'),
|
|
||||||
click: () => self.send('openSettings'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: this.i18nService.t('syncVault'),
|
label: this.i18nService.t('syncVault'),
|
||||||
click: () => self.send('syncVault'),
|
click: () => self.send('syncVault'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: this.i18nService.t('lockNow'),
|
|
||||||
click: () => self.send('lockVault'),
|
|
||||||
accelerator: 'CmdOrCtrl+L',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -300,11 +290,27 @@ export class MenuMain {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
const firstMenuOptions: MenuItemConstructorOptions[] = [
|
||||||
template[0].label = app.getName();
|
|
||||||
template[0].submenu = (template[0].submenu as MenuItemConstructorOptions[]).concat([
|
|
||||||
{ type: 'separator' },
|
{ type: 'separator' },
|
||||||
|
{
|
||||||
|
label: this.i18nService.t('settings'),
|
||||||
|
click: () => self.send('openSettings'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.i18nService.t('lockNow'),
|
||||||
|
click: () => self.send('lockVault'),
|
||||||
|
accelerator: 'CmdOrCtrl+L',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
if (process.platform === 'darwin') {
|
||||||
|
const firstMenuPart: MenuItemConstructorOptions[] = [
|
||||||
{ role: 'about' },
|
{ role: 'about' },
|
||||||
|
];
|
||||||
|
|
||||||
|
template.unshift({
|
||||||
|
label: 'Bitwarden',
|
||||||
|
submenu: firstMenuPart.concat(firstMenuOptions, [
|
||||||
{ type: 'separator' },
|
{ type: 'separator' },
|
||||||
{ role: 'services', submenu: [] },
|
{ role: 'services', submenu: [] },
|
||||||
{ type: 'separator' },
|
{ type: 'separator' },
|
||||||
@ -313,16 +319,20 @@ export class MenuMain {
|
|||||||
{ role: 'unhide' },
|
{ role: 'unhide' },
|
||||||
{ type: 'separator' },
|
{ type: 'separator' },
|
||||||
{ role: 'quit' },
|
{ role: 'quit' },
|
||||||
]);
|
]),
|
||||||
|
});
|
||||||
|
|
||||||
// Window menu
|
// Window menu
|
||||||
template[4].submenu = [
|
template[template.length - 2].submenu = [
|
||||||
{ role: 'close' },
|
{ role: 'close' },
|
||||||
{ role: 'minimize' },
|
{ role: 'minimize' },
|
||||||
{ role: 'zoom' },
|
{ role: 'zoom' },
|
||||||
{ type: 'separator' },
|
{ type: 'separator' },
|
||||||
{ role: 'front' },
|
{ role: 'front' },
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
template[0].submenu = (template[0].submenu as MenuItemConstructorOptions[]).concat(
|
||||||
|
firstMenuOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
const menu = Menu.buildFromTemplate(template);
|
const menu = Menu.buildFromTemplate(template);
|
||||||
|
Loading…
Reference in New Issue
Block a user