From d0c1f6d6629304034fe8b01103a964851fd3a419 Mon Sep 17 00:00:00 2001 From: Alec Rippberger Date: Tue, 15 Apr 2025 16:06:45 -0500 Subject: [PATCH] Add "component" to component cache service name --- ...wo-factor-auth-email-component-cache.service.spec.ts} | 2 +- ... => two-factor-auth-email-component-cache.service.ts} | 9 ++++++--- .../two-factor-auth-email.component.ts | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) rename libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/{two-factor-auth-email-cache.service.spec.ts => two-factor-auth-email-component-cache.service.spec.ts} (98%) rename libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/{two-factor-auth-email-cache.service.ts => two-factor-auth-email-component-cache.service.ts} (88%) diff --git a/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-cache.service.spec.ts b/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-component-cache.service.spec.ts similarity index 98% rename from libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-cache.service.spec.ts rename to libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-component-cache.service.spec.ts index 24c6b3aeddd..15c323ed976 100644 --- a/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-cache.service.spec.ts +++ b/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-component-cache.service.spec.ts @@ -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", () => { diff --git a/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-cache.service.ts b/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-component-cache.service.ts similarity index 88% rename from libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-cache.service.ts rename to libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-component-cache.service.ts index 0660fe99e56..84a19615031 100644 --- a/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-cache.service.ts +++ b/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email-component-cache.service.ts @@ -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 = this.viewCacheService.signal({ - key: TWO_FACTOR_AUTH_EMAIL_CACHE_KEY, + key: TWO_FACTOR_AUTH_EMAIL_COMPONENT_CACHE_KEY, initialValue: null, deserializer: TwoFactorAuthEmailCache.fromJSON, }); diff --git a/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email.component.ts b/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email.component.ts index b308ca61442..e973b633b66 100644 --- a/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email.component.ts +++ b/libs/auth/src/angular/two-factor-auth/child-components/two-factor-auth-email/two-factor-auth-email.component.ts @@ -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({