1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

option to not show cards/identities on current tab list

This commit is contained in:
Kyle Spearrin
2018-11-21 14:31:34 -05:00
parent 100f9589bb
commit f043010067
5 changed files with 66 additions and 6 deletions

View File

@@ -25,6 +25,8 @@ export class OptionsComponent implements OnInit {
disableContextMenuItem = false;
disableAddLoginNotification = false;
disableChangedPasswordNotification = false;
dontShowCards = false;
dontShowIdentities = false;
showDisableContextMenu = true;
disableGa = false;
theme: string;
@@ -60,6 +62,9 @@ export class OptionsComponent implements OnInit {
this.disableContextMenuItem = await this.storageService.get<boolean>(
ConstantsService.disableContextMenuItemKey);
this.dontShowCards = await this.storageService.get<boolean>(ConstantsService.dontShowCardsCurrentTab);
this.dontShowIdentities = await this.storageService.get<boolean>(ConstantsService.dontShowIdentitiesCurrentTab);
this.disableAutoTotpCopy = !await this.totpService.isAutoCopyEnabled();
this.disableFavicon = await this.storageService.get<boolean>(ConstantsService.disableFaviconKey);
@@ -112,6 +117,18 @@ export class OptionsComponent implements OnInit {
this.callAnalytics('Favicon', !this.disableFavicon);
}
async updateShowCards() {
await this.storageService.save(ConstantsService.dontShowCardsCurrentTab, this.dontShowCards);
await this.stateService.save(ConstantsService.dontShowCardsCurrentTab, this.dontShowCards);
this.callAnalytics('Show Cards on Current Tab', !this.dontShowCards);
}
async updateShowIdentities() {
await this.storageService.save(ConstantsService.dontShowIdentitiesCurrentTab, this.dontShowIdentities);
await this.stateService.save(ConstantsService.dontShowIdentitiesCurrentTab, this.dontShowIdentities);
this.callAnalytics('Show Identities on Current Tab', !this.dontShowIdentities);
}
async saveTheme() {
await this.storageService.save(ConstantsService.themeKey, this.theme);
this.analytics.eventTrack.next({ action: 'Set Theme ' + this.theme });