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

browser version of 287 issue

added condition when badge should set text based on setting
This commit is contained in:
Vlad
2021-02-22 01:35:14 +03:00
parent 2ac9f92267
commit eb59c9e692
48 changed files with 287 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ import { ConstantsService } from 'jslib/services/constants.service';
})
export class OptionsComponent implements OnInit {
disableFavicon = false;
disableBadgeCounter = false;
enableAutoFillOnPageLoad = false;
disableAutoTotpCopy = false;
disableContextMenuItem = false;
@@ -86,6 +87,8 @@ export class OptionsComponent implements OnInit {
this.disableFavicon = await this.storageService.get<boolean>(ConstantsService.disableFaviconKey);
this.disableBadgeCounter = await this.storageService.get<boolean>(ConstantsService.disableBadgeCounterKey);
this.theme = await this.storageService.get<string>(ConstantsService.themeKey);
const defaultUriMatch = await this.storageService.get<UriMatchType>(ConstantsService.defaultUriMatch);
@@ -129,6 +132,12 @@ export class OptionsComponent implements OnInit {
this.callAnalytics('Favicon', !this.disableFavicon);
}
async updateDisableBadgeCounter() {
await this.storageService.save(ConstantsService.disableBadgeCounterKey, this.disableBadgeCounter);
await this.stateService.save(ConstantsService.disableBadgeCounterKey, this.disableBadgeCounter);
this.callAnalytics('Badge Counter', !this.disableBadgeCounter);
}
async updateShowCards() {
await this.storageService.save(ConstantsService.dontShowCardsCurrentTab, this.dontShowCards);
await this.stateService.save(ConstantsService.dontShowCardsCurrentTab, this.dontShowCards);