From ebba0a9e2361a0523118ef3e71dad3f9a49ada40 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 12 Apr 2018 17:28:33 -0400 Subject: [PATCH] settings help and about --- src/popup/settings/settings.component.html | 17 ++++++++++------- src/popup/settings/settings.component.ts | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/popup/settings/settings.component.html b/src/popup/settings/settings.component.html index a45ca42938..c3b41e5ede 100644 --- a/src/popup/settings/settings.component.html +++ b/src/popup/settings/settings.component.html @@ -11,11 +11,11 @@
{{'manage' | i18n}}
- +
{{'folders' | i18n}}
- +
{{'sync' | i18n}}
@@ -45,7 +45,7 @@
{{'account' | i18n}}
- +
{{'premiumMembership' | i18n}}
@@ -73,7 +73,8 @@
{{'exportVault' | i18n}}
- +
{{'shareVault' | i18n}}
@@ -82,15 +83,17 @@
{{'other' | i18n}}
- +
{{'options' | i18n}}
- +
{{'about' | i18n}}
- +
{{'helpFeedback' | i18n}}
diff --git a/src/popup/settings/settings.component.ts b/src/popup/settings/settings.component.ts index b06bdc0d02..2e42012616 100644 --- a/src/popup/settings/settings.component.ts +++ b/src/popup/settings/settings.component.ts @@ -1,4 +1,5 @@ import { Angulartics2 } from 'angulartics2'; +import swal from 'sweetalert'; import { Component, @@ -127,6 +128,27 @@ export class SettingsComponent implements OnInit { BrowserApi.createNewTab('https://help.bitwarden.com/article/import-data/'); } + help() { + this.analytics.eventTrack.next({ action: 'Clicked Help and Feedback' }); + BrowserApi.createNewTab('https://help.bitwarden.com/'); + } + + about() { + this.analytics.eventTrack.next({ action: 'Clicked About' }); + + const versionText = document.createTextNode( + this.i18nService.t('version') + ': ' + BrowserApi.getApplicationVersion()); + const div = document.createElement('div'); + div.innerHTML = `

+

Bitwarden
© 8bit Solutions LLC 2015-` + (new Date()).getFullYear() + `

`; + div.appendChild(versionText); + + swal({ + content: { element: div }, + buttons: [this.i18nService.t('close'), false], + }); + } + rate() { this.analytics.eventTrack.next({ action: 'Rate Extension' }); BrowserApi.createNewTab((RateUrls as any)[this.platformUtilsService.getDevice()]);