1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

Remove biometric from firefox

This commit is contained in:
Hinton
2021-01-25 21:23:18 +01:00
parent a971fc3960
commit ab759a4746
5 changed files with 10 additions and 15 deletions

View File

@@ -42,7 +42,7 @@
<label for="pin">{{'unlockWithPin' | i18n}}</label>
<input id="pin" type="checkbox" (change)="updatePin()" [(ngModel)]="pin">
</div>
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<div class="box-content-row box-content-row-checkbox" appBoxRow *ngIf="supportsBiometric">
<label for="biometric">{{'unlockWithBiometrics' | i18n}}</label>
<input id="biometric" type="checkbox" (change)="updateBiometric()" [(ngModel)]="biometric">
</div>

View File

@@ -52,6 +52,7 @@ export class SettingsComponent implements OnInit {
vaultTimeoutActions: any[];
vaultTimeoutAction: string;
pin: boolean = null;
supportsBiometric: boolean;
biometric: boolean = false;
previousVaultTimeout: number = null;
@@ -102,6 +103,8 @@ export class SettingsComponent implements OnInit {
const pinSet = await this.vaultTimeoutService.isPinLockSet();
this.pin = pinSet[0] || pinSet[1];
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
this.biometric = await this.vaultTimeoutService.isBiometricLockSet();
}
@@ -208,7 +211,7 @@ export class SettingsComponent implements OnInit {
}
async updateBiometric() {
if (this.biometric) {
if (this.biometric && this.supportsBiometric) {
// Request permission to use the optional permission for nativeMessaging
if (!this.platformUtilsService.isFirefox()) {