mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Add setting for toggling hide dock
This commit is contained in:
@@ -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}` });
|
||||
|
||||
Reference in New Issue
Block a user