1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

settings help and about

This commit is contained in:
Kyle Spearrin
2018-04-12 17:28:33 -04:00
parent fa6fc76346
commit ebba0a9e23
2 changed files with 32 additions and 7 deletions

View File

@@ -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 = `<p><i class="fa fa-shield fa-3x"></i></p>
<p><strong>Bitwarden</strong><br>&copy; 8bit Solutions LLC 2015-` + (new Date()).getFullYear() + `</p>`;
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()]);