mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
Tray icon (#84)
* Implemented configurable tray icon * Fixed calls to callAnalytics using wrong indicators
This commit is contained in:
@@ -14,6 +14,7 @@ import { StateService } from 'jslib/abstractions/state.service';
|
||||
import { StorageService } from 'jslib/abstractions/storage.service';
|
||||
|
||||
import { ConstantsService } from 'jslib/services/constants.service';
|
||||
import { DesktopConstantsService } from '../../services/desktopconstants.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
@@ -23,6 +24,7 @@ export class SettingsComponent implements OnInit {
|
||||
lockOption: number = null;
|
||||
disableGa: boolean = false;
|
||||
disableFavicons: boolean = false;
|
||||
enableHideInTray: boolean = false;
|
||||
locale: string;
|
||||
lockOptions: any[];
|
||||
localeOptions: any[];
|
||||
@@ -55,6 +57,7 @@ export class SettingsComponent implements OnInit {
|
||||
async ngOnInit() {
|
||||
this.lockOption = await this.storageService.get<number>(ConstantsService.lockOptionKey);
|
||||
this.disableFavicons = await this.storageService.get<boolean>(ConstantsService.disableFaviconKey);
|
||||
this.enableHideInTray = await this.storageService.get<boolean>(DesktopConstantsService.enableHideInTrayKey);
|
||||
this.locale = await this.storageService.get<string>(ConstantsService.localeKey);
|
||||
|
||||
const disableGa = await this.storageService.get<boolean>(ConstantsService.disableGaKey);
|
||||
@@ -80,7 +83,12 @@ export class SettingsComponent implements OnInit {
|
||||
await this.storageService.save(ConstantsService.disableFaviconKey, this.disableFavicons);
|
||||
await this.stateService.save(ConstantsService.disableFaviconKey, this.disableFavicons);
|
||||
this.messagingService.send('refreshCiphers');
|
||||
this.callAnalytics('Favicons', !this.disableGa);
|
||||
this.callAnalytics('Favicons', !this.disableFavicons);
|
||||
}
|
||||
|
||||
async saveHideInTray() {
|
||||
await this.storageService.save(DesktopConstantsService.enableHideInTrayKey, this.enableHideInTray);
|
||||
this.callAnalytics('HideInTray', this.enableHideInTray);
|
||||
}
|
||||
|
||||
async saveLocale() {
|
||||
|
||||
Reference in New Issue
Block a user