mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-30 13:03:53 +01:00
Add setting for toggling hide dock
This commit is contained in:
parent
ac05ec4afc
commit
002dd2752b
@ -128,6 +128,16 @@
|
||||
</div>
|
||||
<small class="help-block">{{'startToTrayDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="showHideDock">
|
||||
<div class="checkbox">
|
||||
<label for="hideDock">
|
||||
<input id="hideDock" type="checkbox" name="HideDock" [(ngModel)]="hideDock"
|
||||
(change)="saveHideDock()">
|
||||
{{'hideDock' | i18n}}
|
||||
</label>
|
||||
</div>
|
||||
<small class="help-block">{{'hideDockDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="theme">{{'theme' | i18n}}</label>
|
||||
<select id="theme" name="Theme" [(ngModel)]="theme" (change)="saveTheme()">
|
||||
|
@ -51,6 +51,8 @@ export class SettingsComponent implements OnInit {
|
||||
supportsBiometric: boolean;
|
||||
biometric: boolean;
|
||||
biometricText: string;
|
||||
hideDock: boolean;
|
||||
showHideDock: boolean = false;
|
||||
|
||||
constructor(private analytics: Angulartics2, private toasterService: ToasterService,
|
||||
private i18nService: I18nService, private platformUtilsService: PlatformUtilsService,
|
||||
@ -131,6 +133,8 @@ export class SettingsComponent implements OnInit {
|
||||
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
|
||||
this.biometric = await this.vaultTimeoutService.isBiometricLockSet();
|
||||
this.biometricText = await this.storageService.get<string>(ConstantsService.biometricText);
|
||||
this.hideDock = await this.storageService.get<boolean>(ElectronConstants.hideDock);
|
||||
this.showHideDock = this.platformUtilsService.getDevice() === DeviceType.MacOsDesktop;
|
||||
}
|
||||
|
||||
async saveVaultTimeoutOptions() {
|
||||
@ -277,6 +281,10 @@ export class SettingsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async saveHideDock() {
|
||||
await this.storageService.save(ElectronConstants.hideDock, this.hideDock);
|
||||
}
|
||||
|
||||
private callAnalytics(name: string, enabled: boolean) {
|
||||
const status = enabled ? 'Enabled' : 'Disabled';
|
||||
this.analytics.eventTrack.next({ action: `${status} ${name}` });
|
||||
|
@ -870,6 +870,12 @@
|
||||
"startToTrayDesc": {
|
||||
"message": "When the application is first started, only show an icon in the system tray."
|
||||
},
|
||||
"hideDock": {
|
||||
"message": "Hide dock icon"
|
||||
},
|
||||
"hideDockDesc": {
|
||||
"message": "Hide Bitwarden from the Dock when minimized to the menu bar."
|
||||
},
|
||||
"language": {
|
||||
"message": "Language"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user