From c499c3d08161a025f47d0c02f0ccc4b89c60c8a2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 25 Sep 2019 20:56:57 -0400 Subject: [PATCH] legal links for mac app store --- src/locales/en/messages.json | 10 ++++++++++ src/main/menu.main.ts | 29 ++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 9bd45c52829..d031645f804 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -1257,5 +1257,15 @@ }, "premiumManageAlertAppStore": { "message": "You can manage your subscription from the App Store. Do you want to visit the App Store now?" + }, + "legal": { + "message": "Legal", + "description": "Noun. As in 'legal documents', like our terms of service and privacy policy." + }, + "termsOfService": { + "message": "Terms of Service" + }, + "privacyPolicy": { + "message": "Privacy Policy" } } diff --git a/src/main/menu.main.ts b/src/main/menu.main.ts index 2ac8df7025f..1818b374544 100644 --- a/src/main/menu.main.ts +++ b/src/main/menu.main.ts @@ -156,7 +156,7 @@ export class MenuMain extends BaseMenu { }); } - const helpSubmenu: MenuItemConstructorOptions[] = [ + let helpSubmenu: MenuItemConstructorOptions[] = [ { label: this.main.i18nService.t('emailUs'), click: () => shell.openExternal('mailTo:hello@bitwarden.com'), @@ -169,6 +169,25 @@ export class MenuMain extends BaseMenu { label: this.main.i18nService.t('fileBugReport'), click: () => shell.openExternal('https://github.com/bitwarden/desktop'), }, + ]; + + if (isMacAppStore()) { + helpSubmenu.push({ + label: this.main.i18nService.t('legal'), + submenu: [ + { + label: this.main.i18nService.t('termsOfService'), + click: () => shell.openExternal('https://bitwarden.com/terms/'), + }, + { + label: this.main.i18nService.t('privacyPolicy'), + click: () => shell.openExternal('https://bitwarden.com/privacy/'), + }, + ], + }); + } + + helpSubmenu = helpSubmenu.concat([ { type: 'separator' }, { label: this.main.i18nService.t('followUs'), @@ -196,7 +215,7 @@ export class MenuMain extends BaseMenu { label: this.main.i18nService.t('goToWebVault'), click: async () => await this.openWebVault(), }, - ]; + ]); if (!isWindowsStore()) { helpSubmenu.push({ @@ -397,9 +416,9 @@ export class MenuMain extends BaseMenu { // File menu template[0].submenu = (template[0].submenu as MenuItemConstructorOptions[]).concat( firstMenuOptions, { - label: this.i18nService.t('quitBitwarden'), - role: 'quit', - }); + label: this.i18nService.t('quitBitwarden'), + role: 'quit', + }); // About menu const aboutMenuAdditions: MenuItemConstructorOptions[] = [