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:
@@ -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>
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user