mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +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:
@@ -53,6 +53,16 @@
|
||||
<small class="help-block">{{'enableMinToTrayDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="showMinToTray">
|
||||
<div class="checkbox">
|
||||
<label for="startMinimized">
|
||||
<input id="startMinimized" type="checkbox" name="StartMinimized"
|
||||
[(ngModel)]="startMinimized" (change)="saveStartMinimized()">
|
||||
{{'startMinimized' | i18n}}
|
||||
</label>
|
||||
</div>
|
||||
<small class="help-block">{{'startMinimizedDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="enableCloseToTray">
|
||||
<input id="enableCloseToTray" type="checkbox" name="EnableCloseToTray"
|
||||
|
||||
@@ -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