mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 19:53:43 +00:00
Automatic biometrics prompt (#2065)
Co-authored-by: Michael Cho <mcho@tutanota.com>
This commit is contained in:
@@ -56,6 +56,7 @@ export class SettingsComponent implements OnInit {
|
||||
pin: boolean = null;
|
||||
supportsBiometric: boolean;
|
||||
biometric: boolean = false;
|
||||
disableAutoBiometricsPrompt = true;
|
||||
previousVaultTimeout: number = null;
|
||||
|
||||
vaultTimeout: FormControl = new FormControl(null);
|
||||
@@ -115,6 +116,8 @@ export class SettingsComponent implements OnInit {
|
||||
|
||||
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
|
||||
this.biometric = await this.vaultTimeoutService.isBiometricLockSet();
|
||||
this.disableAutoBiometricsPrompt = await this.storageService.get<boolean>(
|
||||
ConstantsService.disableAutoBiometricsPromptKey) ?? true;
|
||||
}
|
||||
|
||||
async saveVaultTimeout(newValue: number) {
|
||||
@@ -250,6 +253,10 @@ export class SettingsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async updateAutoBiometricsPrompt() {
|
||||
await this.storageService.save(ConstantsService.disableAutoBiometricsPromptKey, this.disableAutoBiometricsPrompt);
|
||||
}
|
||||
|
||||
async lock() {
|
||||
await this.vaultTimeoutService.lock(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user