1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

option to disable change password notification

This commit is contained in:
Kyle Spearrin
2018-07-31 23:48:11 -04:00
parent cf57eadd1d
commit 4076247908
5 changed files with 53 additions and 19 deletions

View File

@@ -45,13 +45,23 @@
<div class="box">
<div class="box-content">
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="notification-bar">{{'disableAddLoginNotification' | i18n}}</label>
<input id="notification-bar" type="checkbox" (change)="updateAddLoginNotification()"
<label for="addlogin-notification-bar">{{'disableAddLoginNotification' | i18n}}</label>
<input id="addlogin-notification-bar" type="checkbox" (change)="updateAddLoginNotification()"
[(ngModel)]="disableAddLoginNotification">
</div>
</div>
<div class="box-footer">{{'addLoginNotificationDesc' | i18n}}</div>
</div>
<div class="box">
<div class="box-content">
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="changedpass-notification-bar">{{'disableChangedPasswordNotification' | i18n}}</label>
<input id="changedpass-notification-bar" type="checkbox" (change)="updateChangedPasswordNotification()"
[(ngModel)]="disableChangedPasswordNotification">
</div>
</div>
<div class="box-footer">{{'disableChangedPasswordNotificationDesc' | i18n}}</div>
</div>
<div class="box" *ngIf="showDisableContextMenu">
<div class="box-content">
<div class="box-content-row box-content-row-checkbox" appBoxRow>

View File

@@ -24,6 +24,7 @@ export class OptionsComponent implements OnInit {
disableAutoTotpCopy = false;
disableContextMenuItem = false;
disableAddLoginNotification = false;
disableChangedPasswordNotification = false;
showDisableContextMenu = true;
disableGa = false;
theme: string;
@@ -53,6 +54,9 @@ export class OptionsComponent implements OnInit {
this.disableAddLoginNotification = await this.storageService.get<boolean>(
ConstantsService.disableAddLoginNotificationKey);
this.disableChangedPasswordNotification = await this.storageService.get<boolean>(
ConstantsService.disableChangedPasswordNotificationKey);
this.disableContextMenuItem = await this.storageService.get<boolean>(
ConstantsService.disableContextMenuItemKey);
@@ -79,6 +83,12 @@ export class OptionsComponent implements OnInit {
this.callAnalytics('Add Login Notification', !this.disableAddLoginNotification);
}
async updateChangedPasswordNotification() {
await this.storageService.save(ConstantsService.disableChangedPasswordNotificationKey,
this.disableChangedPasswordNotification);
this.callAnalytics('Changed Password Notification', !this.disableChangedPasswordNotification);
}
async updateDisableContextMenuItem() {
await this.storageService.save(ConstantsService.disableContextMenuItemKey,
this.disableContextMenuItem);