mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Allow app to start minimized (as tray icon) (#169)
* Allow app to start minimized (as tray icon) * Rever german locale
This commit is contained in:
@@ -32,6 +32,7 @@ export class SettingsComponent implements OnInit {
|
||||
enableCloseToTray: boolean = false;
|
||||
enableTray: boolean = false;
|
||||
showMinToTray: boolean = false;
|
||||
startMinimized: boolean = false;
|
||||
locale: string;
|
||||
lockOptions: any[];
|
||||
localeOptions: any[];
|
||||
@@ -80,6 +81,7 @@ export class SettingsComponent implements OnInit {
|
||||
this.enableMinToTray = await this.storageService.get<boolean>(ElectronConstants.enableMinimizeToTrayKey);
|
||||
this.enableCloseToTray = await this.storageService.get<boolean>(ElectronConstants.enableCloseToTrayKey);
|
||||
this.enableTray = await this.storageService.get<boolean>(ElectronConstants.enableTrayKey);
|
||||
this.startMinimized = await this.storageService.get<boolean>(ElectronConstants.enableStartMinimizedKey);
|
||||
this.locale = await this.storageService.get<string>(ConstantsService.localeKey);
|
||||
this.theme = await this.storageService.get<string>(ConstantsService.themeKey);
|
||||
}
|
||||
@@ -111,6 +113,11 @@ export class SettingsComponent implements OnInit {
|
||||
this.messagingService.send(this.enableTray ? 'showTray' : 'removeTray');
|
||||
}
|
||||
|
||||
async saveStartMinimized() {
|
||||
await this.storageService.save(ElectronConstants.enableStartMinimizedKey, this.startMinimized);
|
||||
this.callAnalytics('StartMinimized', this.startMinimized);
|
||||
}
|
||||
|
||||
async saveLocale() {
|
||||
await this.storageService.save(ConstantsService.localeKey, this.locale);
|
||||
this.analytics.eventTrack.next({ action: 'Set Locale ' + this.locale });
|
||||
|
||||
Reference in New Issue
Block a user