mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 02:33:46 +00:00
Merge pull request #1630 from vrnvorona/add-disable-badge-counter
Option to disable badge text on icon
This commit is contained in:
@@ -115,6 +115,15 @@
|
||||
</div>
|
||||
<div class="box-footer">{{'disableFaviconDesc' | i18n}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-content">
|
||||
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
||||
<label for="badge">{{'disableBadgeCounter' | i18n}}</label>
|
||||
<input id="badge" type="checkbox" (change)="updateDisableBadgeCounter()" [(ngModel)]="disableBadgeCounter">
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">{{'disableBadgeCounterDesc' | i18n}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
|
||||
@@ -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.messagingService.send('bgUpdateContextMenu');
|
||||
}
|
||||
|
||||
async updateShowCards() {
|
||||
await this.storageService.save(ConstantsService.dontShowCardsCurrentTab, this.dontShowCards);
|
||||
await this.stateService.save(ConstantsService.dontShowCardsCurrentTab, this.dontShowCards);
|
||||
|
||||
Reference in New Issue
Block a user