1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-22 04:14:04 +00:00

Refactor TwoFactorFormCacheService

This commit is contained in:
Alec Rippberger
2025-04-07 10:42:21 -05:00
parent ac279ec2a4
commit 7adc4eaee5
16 changed files with 158 additions and 489 deletions

View File

@@ -0,0 +1,19 @@
import { Jsonify } from "type-fest";
import { View } from "@bitwarden/common/models/view/view";
import { TwoFactorProviderType } from "../../enums/two-factor-provider-type";
/**
* This is a cache model for the two factor form.
*/
export class TwoFactorFormView implements View {
token: string | undefined = undefined;
remember: boolean | undefined = undefined;
selectedProviderType: TwoFactorProviderType | undefined = undefined;
emailSent: boolean | undefined = undefined;
static fromJSON(obj: Partial<Jsonify<TwoFactorFormView>>): TwoFactorFormView {
return Object.assign(new TwoFactorFormView(), obj);
}
}