diff --git a/libs/vault/src/cipher-view/card-details/card-details-view.component.html b/libs/vault/src/cipher-view/card-details/card-details-view.component.html
index fff771b646..ff61addd7d 100644
--- a/libs/vault/src/cipher-view/card-details/card-details-view.component.html
+++ b/libs/vault/src/cipher-view/card-details/card-details-view.component.html
@@ -33,6 +33,7 @@
bitIconButton
bitPasswordInputToggle
data-testid="toggle-number"
+ [toggled]="revealCardNumber"
(toggledChange)="logCardEvent($event, EventType.Cipher_ClientToggledCardNumberVisible)"
>
diff --git a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts
index 27d81f32ee..d99ac438f2 100644
--- a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts
+++ b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts
@@ -1,7 +1,15 @@
// 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, EventEmitter, inject, Input, Output } from "@angular/core";
+import {
+ Component,
+ EventEmitter,
+ inject,
+ Input,
+ OnChanges,
+ Output,
+ SimpleChanges,
+} from "@angular/core";
import { Observable, switchMap } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module";
@@ -51,7 +59,7 @@ type TotpCodeValues = {
LinkModule,
],
})
-export class LoginCredentialsViewComponent {
+export class LoginCredentialsViewComponent implements OnChanges {
@Input() cipher: CipherView;
@Input() activeUserId: UserId;
@Input() hadPendingChangePasswordTask: boolean;
@@ -85,6 +93,13 @@ export class LoginCredentialsViewComponent {
return `${dateCreated} ${creationDate}`;
}
+ ngOnChanges(changes: SimpleChanges): void {
+ if (changes["cipher"]) {
+ this.passwordRevealed = false;
+ this.showPasswordCount = false;
+ }
+ }
+
async getPremium(organizationId?: string) {
await this.premiumUpgradeService.promptForPremium(organizationId);
}