1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

start to tray updates

This commit is contained in:
Kyle Spearrin
2019-02-02 12:27:06 -05:00
parent a380188120
commit 65845cd909
5 changed files with 23 additions and 28 deletions

View File

@@ -53,16 +53,6 @@
<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"
@@ -72,6 +62,16 @@
</div>
<small class="help-block">{{'enableCloseToTrayDesc' | i18n}}</small>
</div>
<div class="form-group" *ngIf="showMinToTray">
<div class="checkbox">
<label for="startToTray">
<input id="startToTray" type="checkbox" name="StartToTray"
[(ngModel)]="startToTray" (change)="saveStartToTray()">
{{'startToTray' | i18n}}
</label>
</div>
<small class="help-block">{{'startToTrayDesc' | i18n}}</small>
</div>
<div class="form-group">
<label for="theme">{{'theme' | i18n}}</label>
<select id="theme" name="Theme" [(ngModel)]="theme" (change)="saveTheme()">

View File

@@ -32,7 +32,7 @@ export class SettingsComponent implements OnInit {
enableCloseToTray: boolean = false;
enableTray: boolean = false;
showMinToTray: boolean = false;
startMinimized: boolean = false;
startToTray: boolean = false;
locale: string;
lockOptions: any[];
localeOptions: any[];
@@ -81,7 +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.startToTray = await this.storageService.get<boolean>(ElectronConstants.enableStartToTrayKey);
this.locale = await this.storageService.get<string>(ConstantsService.localeKey);
this.theme = await this.storageService.get<string>(ConstantsService.themeKey);
}
@@ -113,9 +113,9 @@ 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 saveStartToTray() {
await this.storageService.save(ElectronConstants.enableStartToTrayKey, this.startToTray);
this.callAnalytics('StartToTray', this.startToTray);
}
async saveLocale() {