mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
Close to tray (#168)
* Close to Tray implemented * Enable Tray Icon on Linux * Rever german locale * Revert eaf730e51cd6ea025ba78a4e7904bc47e0b44147 * Show quit button in file menu only for linux and windows
This commit is contained in:
@@ -30,6 +30,7 @@ export class SettingsComponent implements OnInit {
|
||||
disableGa: boolean = false;
|
||||
disableFavicons: boolean = false;
|
||||
enableMinToTray: boolean = false;
|
||||
enableCloseToTray: boolean = false;
|
||||
enableTray: boolean = false;
|
||||
showMinToTray: boolean = false;
|
||||
locale: string;
|
||||
@@ -78,6 +79,7 @@ export class SettingsComponent implements OnInit {
|
||||
this.lockOption = await this.storageService.get<number>(ConstantsService.lockOptionKey);
|
||||
this.disableFavicons = await this.storageService.get<boolean>(ConstantsService.disableFaviconKey);
|
||||
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.locale = await this.storageService.get<string>(ConstantsService.localeKey);
|
||||
this.theme = await this.storageService.get<string>(ConstantsService.themeKey);
|
||||
@@ -113,6 +115,11 @@ export class SettingsComponent implements OnInit {
|
||||
this.callAnalytics('MinimizeToTray', this.enableMinToTray);
|
||||
}
|
||||
|
||||
async saveCloseToTray() {
|
||||
await this.storageService.save(ElectronConstants.enableCloseToTrayKey, this.enableCloseToTray);
|
||||
this.callAnalytics('CloseToTray', this.enableCloseToTray);
|
||||
}
|
||||
|
||||
async saveTray() {
|
||||
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
|
||||
this.callAnalytics('Tray', this.enableTray);
|
||||
|
||||
Reference in New Issue
Block a user