From e763b481efb6d63568a77bea8f9532c8a9b8865f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 9 Feb 2018 12:36:37 -0500 Subject: [PATCH] help menu --- src/locales/en/messages.json | 12 +++++++++ src/main/menu.main.ts | 52 +++++++++++++++++++++++++++++++++--- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 918035f8a0..04bb6fb08a 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -630,5 +630,17 @@ }, "passwordGenerator": { "message": "Password Generator" + }, + "emailUs": { + "message": "Email Us" + }, + "visitOurWebsite": { + "message": "Visit Our Website" + }, + "fileBugReport": { + "message": "File a Bug Report" + }, + "blog": { + "message": "Blog" } } diff --git a/src/main/menu.main.ts b/src/main/menu.main.ts index fbec86f384..14831b4dc9 100644 --- a/src/main/menu.main.ts +++ b/src/main/menu.main.ts @@ -4,6 +4,7 @@ import { Menu, MenuItemConstructorOptions, ipcMain, + shell, } from 'electron'; import { WindowMain } from './window.main'; @@ -113,9 +114,9 @@ export class MenuMain { accelerator: 'CmdOrCtrl+F' }, { type: 'separator' }, - { role: 'resetzoom', accelerator: 'CmdOrCtrl+0' }, { role: 'zoomin', accelerator: 'CmdOrCtrl+=' }, { role: 'zoomout', accelerator: 'CmdOrCtrl+-' }, + { role: 'resetzoom', accelerator: 'CmdOrCtrl+0' }, { type: 'separator' }, { role: 'togglefullscreen' }, { type: 'separator' }, @@ -146,8 +147,53 @@ export class MenuMain { role: 'help', submenu: [ { - label: 'Learn More', - click() { require('electron').shell.openExternal('https://electronjs.org') } + label: this.i18nService.t('emailUs'), + click() { + shell.openExternal('mailTo:hello@bitwarden.com') + } + }, + { + label: this.i18nService.t('visitOurWebsite'), + click() { + shell.openExternal('https://bitwarden.com/contact') + } + }, + { + label: this.i18nService.t('fileBugReport'), + click() { + shell.openExternal('https://github.com/bitwarden/desktop') + } + }, + { type: 'separator' }, + { + 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') + } } ] }