1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

some fixes for tray icon

This commit is contained in:
Kyle Spearrin
2018-05-04 13:16:12 -04:00
parent 0f2d1e73b4
commit db0986e95f
9 changed files with 55 additions and 47 deletions

View File

@@ -14,7 +14,8 @@ 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';
import { DesktopConstants } from '../../desktopConstants';
@Component({
selector: 'app-settings',
@@ -24,7 +25,7 @@ export class SettingsComponent implements OnInit {
lockOption: number = null;
disableGa: boolean = false;
disableFavicons: boolean = false;
enableHideInTray: boolean = false;
enableMinToTray: boolean = false;
locale: string;
lockOptions: any[];
localeOptions: any[];
@@ -57,7 +58,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.enableMinToTray = await this.storageService.get<boolean>(DesktopConstants.enableMinimizeToTrayKey);
this.locale = await this.storageService.get<string>(ConstantsService.localeKey);
const disableGa = await this.storageService.get<boolean>(ConstantsService.disableGaKey);
@@ -86,9 +87,9 @@ export class SettingsComponent implements OnInit {
this.callAnalytics('Favicons', !this.disableFavicons);
}
async saveHideInTray() {
await this.storageService.save(DesktopConstantsService.enableHideInTrayKey, this.enableHideInTray);
this.callAnalytics('HideInTray', this.enableHideInTray);
async saveMinToTray() {
await this.storageService.save(DesktopConstants.enableMinimizeToTrayKey, this.enableMinToTray);
this.callAnalytics('MinimizeToTray', this.enableMinToTray);
}
async saveLocale() {