1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 21:20:27 +00:00

Add "component" to component cache service name

This commit is contained in:
Alec Rippberger
2025-04-15 16:06:45 -05:00
parent b11b950ef5
commit d0c1f6d662
3 changed files with 8 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import { ConfigService } from "@bitwarden/common/platform/abstractions/config/co
import {
TwoFactorAuthEmailCache,
TwoFactorAuthEmailComponentCacheService,
} from "./two-factor-auth-email-cache.service";
} from "./two-factor-auth-email-component-cache.service";
describe("TwoFactorAuthEmailCache", () => {
describe("fromJSON", () => {

View File

@@ -5,10 +5,13 @@ import { ViewCacheService } from "@bitwarden/angular/platform/abstractions/view-
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
const TWO_FACTOR_AUTH_EMAIL_CACHE_KEY = "two-factor-auth-email-cache";
/**
* The key for the email two factor auth component cache.
*/
export const TWO_FACTOR_AUTH_EMAIL_COMPONENT_CACHE_KEY = "two-factor-auth-email-component-cache";
/**
* Cache model for the email two factor
* Cache model for the email two factor auth component.
*/
export class TwoFactorAuthEmailCache {
emailSent: boolean = false;
@@ -39,7 +42,7 @@ export class TwoFactorAuthEmailComponentCacheService {
*/
private emailCache: WritableSignal<TwoFactorAuthEmailCache | null> =
this.viewCacheService.signal<TwoFactorAuthEmailCache | null>({
key: TWO_FACTOR_AUTH_EMAIL_CACHE_KEY,
key: TWO_FACTOR_AUTH_EMAIL_COMPONENT_CACHE_KEY,
initialValue: null,
deserializer: TwoFactorAuthEmailCache.fromJSON,
});

View File

@@ -22,7 +22,7 @@ import {
ToastService,
} from "@bitwarden/components";
import { TwoFactorAuthEmailComponentCacheService } from "./two-factor-auth-email-cache.service";
import { TwoFactorAuthEmailComponentCacheService } from "./two-factor-auth-email-component-cache.service";
import { TwoFactorAuthEmailComponentService } from "./two-factor-auth-email-component.service";
@Component({