mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
[PM-14423] item view security task (#13485)
* show pending change password tasks for ciphers in extension
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { CommonModule, DatePipe } from "@angular/common";
|
||||
import { Component, inject, Input } from "@angular/core";
|
||||
import { Component, EventEmitter, inject, Input, Output } from "@angular/core";
|
||||
import { Observable, switchMap } from "rxjs";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
@@ -10,6 +10,7 @@ import { AccountService } from "@bitwarden/common/auth/abstractions/account.serv
|
||||
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions";
|
||||
import { EventType } from "@bitwarden/common/enums";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { PremiumUpgradePromptService } from "@bitwarden/common/vault/abstractions/premium-upgrade-prompt.service";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import {
|
||||
@@ -17,6 +18,7 @@ import {
|
||||
SectionComponent,
|
||||
SectionHeaderComponent,
|
||||
TypographyModule,
|
||||
LinkModule,
|
||||
IconButtonModule,
|
||||
BadgeModule,
|
||||
ColorPasswordModule,
|
||||
@@ -46,10 +48,14 @@ type TotpCodeValues = {
|
||||
ColorPasswordModule,
|
||||
BitTotpCountdownComponent,
|
||||
ReadOnlyCipherCardComponent,
|
||||
LinkModule,
|
||||
],
|
||||
})
|
||||
export class LoginCredentialsViewComponent {
|
||||
@Input() cipher: CipherView;
|
||||
@Input() activeUserId: UserId;
|
||||
@Input() hadPendingChangePasswordTask: boolean;
|
||||
@Output() handleChangePassword = new EventEmitter<void>();
|
||||
|
||||
isPremium$: Observable<boolean> = this.accountService.activeAccount$.pipe(
|
||||
switchMap((account) =>
|
||||
@@ -59,6 +65,7 @@ export class LoginCredentialsViewComponent {
|
||||
showPasswordCount: boolean = false;
|
||||
passwordRevealed: boolean = false;
|
||||
totpCodeCopyObj: TotpCodeValues;
|
||||
|
||||
private datePipe = inject(DatePipe);
|
||||
|
||||
constructor(
|
||||
@@ -111,4 +118,8 @@ export class LoginCredentialsViewComponent {
|
||||
this.cipher.organizationId,
|
||||
);
|
||||
}
|
||||
|
||||
launchChangePasswordEvent(): void {
|
||||
this.handleChangePassword.emit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user