1
0
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:
Alec Rippberger
2025-04-24 16:47:13 -05:00
parent c5574ee156
commit f34ab73ec3
2 changed files with 9 additions and 6 deletions

View File

@@ -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

View File

@@ -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);