1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[PM-23722] Add missing account security badge (#15603)

* add account security nudge logic to settings v2 and badge check in nudges service
This commit is contained in:
Jason Ng
2025-07-16 09:58:07 -04:00
committed by GitHub
parent 21834aeae7
commit ee598288d4
5 changed files with 27 additions and 4 deletions

View File

@@ -10,7 +10,16 @@
<bit-item>
<a bit-item-content routerLink="/account-security">
<i slot="start" class="bwi bwi-lock" aria-hidden="true"></i>
{{ "accountSecurity" | i18n }}
<div class="tw-flex tw-items-center tw-justify-center">
<p class="tw-pr-2">{{ "accountSecurity" | i18n }}</p>
<span
*ngIf="showAcctSecurityNudge$ | async"
bitBadge
variant="notification"
[attr.aria-label]="'nudgeBadgeAria' | i18n"
>1</span
>
</div>
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</a>
</bit-item>

View File

@@ -50,6 +50,12 @@ export class SettingsV2Component implements OnInit {
shareReplay({ bufferSize: 1, refCount: true }),
);
protected showAcctSecurityNudge$: Observable<boolean> = this.authenticatedAccount$.pipe(
switchMap((account) =>
this.nudgesService.showNudgeBadge$(NudgeType.AccountSecurity, account.id),
),
);
showDownloadBitwardenNudge$: Observable<boolean> = this.authenticatedAccount$.pipe(
switchMap((account) =>
this.nudgesService.showNudgeBadge$(NudgeType.DownloadBitwarden, account.id),