1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 03:03:43 +00:00

[PS-683] Fix missed defaults and sentence cases (#3095)

* chore: remove superfluous default

* fix: translations

* feat: dont update auto biometric but hide the option

* feat: hide auto biometrics if biometrics are disabled

* refactor: make updateBiometric easier to read and add bug note

* chore: add comment about bug getting resolved

* refactor: merge two if-cases
This commit is contained in:
Andreas Coroiu
2022-07-19 14:51:08 +02:00
committed by GitHub
parent 0a4b8b15bc
commit acbd789c2b
5 changed files with 30 additions and 27 deletions

View File

@@ -59,7 +59,11 @@
[(ngModel)]="biometric"
/>
</div>
<div class="box-content-row box-content-row-checkbox" appBoxRow *ngIf="supportsBiometric">
<div
class="box-content-row box-content-row-checkbox"
appBoxRow
*ngIf="supportsBiometric && biometric"
>
<label for="autoBiometricsPrompt">{{ "enableAutoBiometricsPrompt" | i18n }}</label>
<input
id="autoBiometricsPrompt"

View File

@@ -114,9 +114,7 @@ export class SettingsComponent implements OnInit {
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
this.biometric = await this.vaultTimeoutService.isBiometricLockSet();
const disableAutoBiometricsPrompt =
(await this.stateService.getDisableAutoBiometricsPrompt()) ?? true;
this.enableAutoBiometricsPrompt = !disableAutoBiometricsPrompt;
this.enableAutoBiometricsPrompt = !(await this.stateService.getDisableAutoBiometricsPrompt());
this.showChangeMasterPass = !(await this.keyConnectorService.getUsesKeyConnector());
}