1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 13:10:17 +00:00

update routing on security.component.html so the 'Master password' tab is styled correctly in UI

This commit is contained in:
rr-bw
2025-04-03 11:07:58 -07:00
parent 50d5b0cb36
commit 7f00ab5847
2 changed files with 10 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
<app-header>
<bit-tab-nav-bar slot="tabs">
<ng-container *ngIf="showChangePassword">
<bit-tab-link route="password">{{ "masterPassword" | i18n }}</bit-tab-link>
<bit-tab-link [route]="changePasswordRoute">{{ "masterPassword" | i18n }}</bit-tab-link>
</ng-container>
<bit-tab-link route="two-factor">{{ "twoStepLogin" | i18n }}</bit-tab-link>
<bit-tab-link route="device-management">{{ "devices" | i18n }}</bit-tab-link>

View File

@@ -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";
}
}
}