From 7f00ab5847971e01d2b28c2362d19bc4d4ac384c Mon Sep 17 00:00:00 2001 From: rr-bw <102181210+rr-bw@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:07:58 -0700 Subject: [PATCH] update routing on security.component.html so the 'Master password' tab is styled correctly in UI --- .../app/auth/settings/security/security.component.html | 2 +- .../src/app/auth/settings/security/security.component.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/auth/settings/security/security.component.html b/apps/web/src/app/auth/settings/security/security.component.html index 28b6855e949..355a33d4427 100644 --- a/apps/web/src/app/auth/settings/security/security.component.html +++ b/apps/web/src/app/auth/settings/security/security.component.html @@ -1,7 +1,7 @@ - {{ "masterPassword" | i18n }} + {{ "masterPassword" | i18n }} {{ "twoStepLogin" | i18n }} {{ "devices" | i18n }} diff --git a/apps/web/src/app/auth/settings/security/security.component.ts b/apps/web/src/app/auth/settings/security/security.component.ts index d643b565df2..b0663f4232c 100644 --- a/apps/web/src/app/auth/settings/security/security.component.ts +++ b/apps/web/src/app/auth/settings/security/security.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from "@angular/core"; import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; @Component({ @@ -9,6 +10,7 @@ import { ConfigService } from "@bitwarden/common/platform/abstractions/config/co }) export class SecurityComponent implements OnInit { showChangePassword = true; + changePasswordRoute = "change-password"; constructor( private userVerificationService: UserVerificationService, @@ -17,5 +19,12 @@ export class SecurityComponent implements OnInit { async ngOnInit() { this.showChangePassword = await this.userVerificationService.hasMasterPassword(); + + const changePasswordRefreshFlag = await this.configService.getFeatureFlag( + FeatureFlag.PM16117_ChangeExistingPasswordRefactor, + ); + if (changePasswordRefreshFlag) { + this.changePasswordRoute = "password"; + } } }