1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

more menu options

This commit is contained in:
Kyle Spearrin 2018-02-09 13:21:23 -05:00
parent e763b481ef
commit 16545d9be7
3 changed files with 184 additions and 34 deletions

View File

@ -72,14 +72,6 @@ export class AppComponent implements OnInit {
break;
case 'syncCompleted':
break;
case 'confirmLogout':
const logoutConfirmed = await this.platformUtilsService.showDialog(
this.i18nService.t('logOutConfirmation'), this.i18nService.t('logOut'),
this.i18nService.t('logOut'), this.i18nService.t('cancel'));
if (logoutConfirmed) {
this.logOut(false);
}
break;
default:
}
});

View File

@ -642,5 +642,35 @@
},
"blog": {
"message": "Blog"
},
"followUs": {
"message": "Follow Us"
},
"syncVault": {
"message": "Sync Vault"
},
"premiumMembership": {
"message": "Premium Membership"
},
"changeMasterPass": {
"message": "Change Master Password"
},
"changeMasterPasswordConfirmation": {
"message": "You can change your master password on the bitwarden.com web vault. Do you want to visit the website now?"
},
"changeEmail": {
"message": "Change Email"
},
"changeEmailConfirmation": {
"message": "You can change your email address on the bitwarden.com web vault. Do you want to visit the website now?"
},
"webVault": {
"message": "Web Vault"
},
"getMobileApp": {
"message": "Get Mobile App"
},
"getBrowserExtension": {
"message": "Get Browser Extension"
}
}

View File

@ -1,6 +1,7 @@
import {
app,
BrowserWindow,
dialog,
Menu,
MenuItemConstructorOptions,
ipcMain,
@ -75,6 +76,12 @@ export class MenuMain {
self.send('openSettings');
}
},
{
label: this.i18nService.t('syncVault'),
click() {
self.send('syncVault');
}
},
{
label: this.i18nService.t('lock'),
click() {
@ -128,10 +135,59 @@ export class MenuMain {
{
label: this.i18nService.t('account'),
submenu: [
{
label: this.i18nService.t('premiumMembership'),
click() {
self.send('premiumMembership');
}
},
{
label: this.i18nService.t('changeMasterPass'),
click() {
const result = dialog.showMessageBox(self.windowMain.win, {
title: self.i18nService.t('changeMasterPass'),
message: self.i18nService.t('changeMasterPasswordConfirmation'),
buttons: [self.i18nService.t('yes'), self.i18nService.t('no')],
cancelId: 1,
defaultId: 0,
noLink: true,
});
if (result === 0) {
shell.openExternal('https://vault.bitwarden.com');
}
}
},
{
label: this.i18nService.t('changeEmail'),
click() {
const result = dialog.showMessageBox(self.windowMain.win, {
title: self.i18nService.t('changeEmail'),
message: self.i18nService.t('changeEmailConfirmation'),
buttons: [self.i18nService.t('yes'), self.i18nService.t('no')],
cancelId: 1,
defaultId: 0,
noLink: true,
});
if (result === 0) {
shell.openExternal('https://vault.bitwarden.com');
}
}
},
{ type: 'separator' },
{
label: this.i18nService.t('logOut'),
click() {
self.send('confirmLogout');
const result = dialog.showMessageBox(self.windowMain.win, {
title: self.i18nService.t('logOut'),
message: self.i18nService.t('logOutConfirmation'),
buttons: [self.i18nService.t('logOut'), self.i18nService.t('cancel')],
cancelId: 1,
defaultId: 0,
noLink: true,
});
if (result === 0) {
self.send('logout');
}
}
},
]
@ -149,51 +205,123 @@ export class MenuMain {
{
label: this.i18nService.t('emailUs'),
click() {
shell.openExternal('mailTo:hello@bitwarden.com')
;
shell.openExternal('mailTo:hello@bitwarden.com');
}
},
{
label: this.i18nService.t('visitOurWebsite'),
click() {
shell.openExternal('https://bitwarden.com/contact')
shell.openExternal('https://bitwarden.com/contact');
}
},
{
label: this.i18nService.t('fileBugReport'),
click() {
shell.openExternal('https://github.com/bitwarden/desktop')
shell.openExternal('https://github.com/bitwarden/desktop');
}
},
{ type: 'separator' },
{
label: this.i18nService.t('blog'),
label: this.i18nService.t('followUs'),
submenu: [
{
label: this.i18nService.t('blog'),
click() {
shell.openExternal('https://blog.bitwarden.com');
}
},
{
label: 'Twitter',
click() {
shell.openExternal('https://twitter.com/bitwarden_app');
}
},
{
label: 'Facebook',
click() {
shell.openExternal('https://www.facebook.com/bitwarden/');
}
},
{
label: 'Google+',
click() {
shell.openExternal('https://plus.google.com/114869903467947368993');
}
},
{
label: 'GitHub',
click() {
shell.openExternal('https://github.com/bitwarden');
}
}
]
},
{ type: 'separator' },
{
label: this.i18nService.t('webVault'),
click() {
shell.openExternal('https://blog.bitwarden.com')
shell.openExternal('https://vault.bitwarden.com');
}
},
{
label: 'Twitter',
click() {
shell.openExternal('https://twitter.com/bitwarden_app')
}
label: this.i18nService.t('getMobileApp'),
submenu: [
{
label: 'iOS',
click() {
shell.openExternal('https://itunes.apple.com/app/' +
'bitwarden-free-password-manager/id1137397744?mt=8');
}
},
{
label: 'Android',
click() {
shell.openExternal('https://play.google.com/store/apps/' +
'details?id=com.x8bit.bitwarden');
}
}
]
},
{
label: 'Facebook',
click() {
shell.openExternal('https://www.facebook.com/bitwarden/')
}
},
{
label: 'Google+',
click() {
shell.openExternal('https://plus.google.com/114869903467947368993')
}
},
{
label: 'GitHub',
click() {
shell.openExternal('https://github.com/bitwarden')
}
label: this.i18nService.t('getBrowserExtension'),
submenu: [
{
label: 'Chrome',
click() {
shell.openExternal('https://chrome.google.com/webstore/detail/' +
+'bitwarden-free-password-m/nngceckbapebfimnlniiiahkandclblb');
}
},
{
label: 'Firefox',
click() {
shell.openExternal('https://addons.mozilla.org/firefox/addon/' +
'bitwarden-password-manager/');
}
},
{
label: 'Opera',
click() {
shell.openExternal('https://addons.opera.com/extensions/details/' +
'bitwarden-free-password-manager/');
}
},
{
label: 'Edge',
click() {
shell.openExternal('https://www.microsoft.com/store/p/' +
'bitwarden-free-password-manager/9p6kxl0svnnl');
}
},
{
label: 'Safari',
click() {
shell.openExternal('https://safari-extensions.apple.com/details/' +
'?id=com.bitwarden.safari-LTZ2PFU5D6');
}
}
]
}
]
}