mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
some fixes for tray icon
This commit is contained in:
@@ -22,16 +22,6 @@
|
||||
{{'options' | i18n}}
|
||||
</div>
|
||||
<div class="box-content box-content-padded">
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="disableGa">
|
||||
<input id="disableGa" type="checkbox" name="DisableAnalytics"
|
||||
[(ngModel)]="disableGa" (change)="saveGa()">
|
||||
{{'disableGa' | i18n}}
|
||||
</label>
|
||||
</div>
|
||||
<small class="help-block">{{'gaDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="disableFavicons">
|
||||
@@ -44,13 +34,23 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="enableHideInTray">
|
||||
<input id="enableHideInTray" type="checkbox" name="EnableHideInTray"
|
||||
[(ngModel)]="enableHideInTray" (change)="saveHideInTray()">
|
||||
{{'enableHideInTray' | i18n}}
|
||||
<label for="enableMinToTray">
|
||||
<input id="enableMinToTray" type="checkbox" name="EnableMinToTray"
|
||||
[(ngModel)]="enableMinToTray" (change)="saveMinToTray()">
|
||||
{{'enableMinToTray' | i18n}}
|
||||
</label>
|
||||
</div>
|
||||
<small class="help-block">{{'enableHideInTrayDesc' | i18n}}</small>
|
||||
<small class="help-block">{{'enableMinToTrayDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="disableGa">
|
||||
<input id="disableGa" type="checkbox" name="DisableAnalytics"
|
||||
[(ngModel)]="disableGa" (change)="saveGa()">
|
||||
{{'disableGa' | i18n}}
|
||||
</label>
|
||||
</div>
|
||||
<small class="help-block">{{'gaDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="locale">{{'language' | i18n}}</label>
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user