mirror of
https://github.com/bitwarden/browser
synced 2026-02-09 13:10:17 +00:00
Use wrapper for caching rmember checkbox
This commit is contained in:
@@ -38,12 +38,7 @@
|
||||
/>
|
||||
<bit-form-control *ngIf="!hideRememberMe()">
|
||||
<bit-label>{{ "dontAskAgainOnThisDeviceFor30Days" | i18n }}</bit-label>
|
||||
<input
|
||||
type="checkbox"
|
||||
bitCheckbox
|
||||
formControlName="remember"
|
||||
(change)="saveFormDataWithPartialData({ remember: $event.target.checked })"
|
||||
/>
|
||||
<input type="checkbox" bitCheckbox formControlName="remember" (change)="onRememberChange()" />
|
||||
</bit-form-control>
|
||||
|
||||
<app-two-factor-auth-webauthn
|
||||
|
||||
@@ -230,6 +230,14 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the remember value to the cache when the checkbox is checked or unchecked
|
||||
*/
|
||||
async onRememberChange() {
|
||||
const rememberValue = !!this.rememberFormControl.value;
|
||||
await this.saveFormDataWithPartialData({ remember: rememberValue });
|
||||
}
|
||||
|
||||
private async initializeSelected2faProviderType(): Promise<TwoFactorProviderType> {
|
||||
const webAuthnSupported = this.platformUtilsService.supportsWebAuthn(this.win);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user