1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-18 11:05:41 +01: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

@ -11,11 +11,11 @@
<div class="box"> <div class="box">
<div class="box-header">{{'manage' | i18n}}</div> <div class="box-header">{{'manage' | i18n}}</div>
<div class="box-content"> <div class="box-content">
<a class="box-content-row box-content-row-flex text-default" href="#"> <a class="box-content-row box-content-row-flex text-default" routerLink="/folders">
<div class="row-main">{{'folders' | i18n}}</div> <div class="row-main">{{'folders' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon"></i> <i class="fa fa-chevron-right fa-lg row-sub-icon"></i>
</a> </a>
<a class="box-content-row box-content-row-flex text-default" href="#"> <a class="box-content-row box-content-row-flex text-default" routerLink="/sync">
<div class="row-main">{{'sync' | i18n}}</div> <div class="row-main">{{'sync' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon"></i> <i class="fa fa-chevron-right fa-lg row-sub-icon"></i>
</a> </a>
@ -45,7 +45,7 @@
<div class="box"> <div class="box">
<div class="box-header">{{'account' | i18n}}</div> <div class="box-header">{{'account' | i18n}}</div>
<div class="box-content"> <div class="box-content">
<a class="box-content-row box-content-row-flex text-default" href="#"> <a class="box-content-row box-content-row-flex text-default" routerLink="/premium">
<div class="row-main">{{'premiumMembership' | i18n}}</div> <div class="row-main">{{'premiumMembership' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon"></i> <i class="fa fa-chevron-right fa-lg row-sub-icon"></i>
</a> </a>
@ -73,7 +73,8 @@
<div class="row-main">{{'exportVault' | i18n}}</div> <div class="row-main">{{'exportVault' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon"></i> <i class="fa fa-chevron-right fa-lg row-sub-icon"></i>
</a> </a>
<a class="box-content-row box-content-row-flex text-default" href="#"> <a class="box-content-row box-content-row-flex text-default" href="#"
appStopClick appBlurClick (click)="share()">
<div class="row-main">{{'shareVault' | i18n}}</div> <div class="row-main">{{'shareVault' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon"></i> <i class="fa fa-chevron-right fa-lg row-sub-icon"></i>
</a> </a>
@ -82,15 +83,17 @@
<div class="box"> <div class="box">
<div class="box-header">{{'other' | i18n}}</div> <div class="box-header">{{'other' | i18n}}</div>
<div class="box-content"> <div class="box-content">
<a class="box-content-row box-content-row-flex text-default" href="#"> <a class="box-content-row box-content-row-flex text-default" routerLink="/options">
<div class="row-main">{{'options' | i18n}}</div> <div class="row-main">{{'options' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon"></i> <i class="fa fa-chevron-right fa-lg row-sub-icon"></i>
</a> </a>
<a class="box-content-row box-content-row-flex text-default" href="#"> <a class="box-content-row box-content-row-flex text-default" href="#"
appStopClick appBlurClick (click)="about()">
<div class="row-main">{{'about' | i18n}}</div> <div class="row-main">{{'about' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon"></i> <i class="fa fa-chevron-right fa-lg row-sub-icon"></i>
</a> </a>
<a class="box-content-row box-content-row-flex text-default" href="#"> <a class="box-content-row box-content-row-flex text-default" href="#"
appStopClick appBlurClick (click)="help()">
<div class="row-main">{{'helpFeedback' | i18n}}</div> <div class="row-main">{{'helpFeedback' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon"></i> <i class="fa fa-chevron-right fa-lg row-sub-icon"></i>
</a> </a>

View File

@ -1,4 +1,5 @@
import { Angulartics2 } from 'angulartics2'; import { Angulartics2 } from 'angulartics2';
import swal from 'sweetalert';
import { import {
Component, Component,
@ -127,6 +128,27 @@ export class SettingsComponent implements OnInit {
BrowserApi.createNewTab('https://help.bitwarden.com/article/import-data/'); 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() { rate() {
this.analytics.eventTrack.next({ action: 'Rate Extension' }); this.analytics.eventTrack.next({ action: 'Rate Extension' });
BrowserApi.createNewTab((RateUrls as any)[this.platformUtilsService.getDevice()]); BrowserApi.createNewTab((RateUrls as any)[this.platformUtilsService.getDevice()]);