diff --git a/apps/desktop/src/vault/app/vault/vault.component.html b/apps/desktop/src/vault/app/vault/vault.component.html index 99131a848cc..9a25619b1a8 100644 --- a/apps/desktop/src/vault/app/vault/vault.component.html +++ b/apps/desktop/src/vault/app/vault/vault.component.html @@ -15,6 +15,7 @@ *ngIf="cipherId && action === 'view'" [cipherId]="cipherId" [collectionId]="activeFilter?.selectedCollectionId" + [masterPasswordAlreadyPrompted]="cipherRepromptId === cipherId" (onCloneCipher)="cloneCipherWithoutPasswordPrompt($event)" (onEditCipher)="editCipher($event)" (onViewCipherPasswordHistory)="viewCipherPasswordHistory($event)" diff --git a/apps/desktop/src/vault/app/vault/view.component.ts b/apps/desktop/src/vault/app/vault/view.component.ts index 084a9a747ed..68bf8d6d1a3 100644 --- a/apps/desktop/src/vault/app/vault/view.component.ts +++ b/apps/desktop/src/vault/app/vault/view.component.ts @@ -3,6 +3,7 @@ import { ChangeDetectorRef, Component, EventEmitter, + Input, NgZone, OnChanges, OnDestroy, @@ -46,6 +47,7 @@ const BroadcasterSubscriptionId = "ViewComponent"; }) export class ViewComponent extends BaseViewComponent implements OnInit, OnDestroy, OnChanges { @Output() onViewCipherPasswordHistory = new EventEmitter(); + @Input() masterPasswordAlreadyPrompted: boolean = false; constructor( cipherService: CipherService, @@ -120,6 +122,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro } }); }); + this.passwordReprompted = this.masterPasswordAlreadyPrompted; } ngOnDestroy() { @@ -134,6 +137,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro }); return; } + this.passwordReprompted = this.masterPasswordAlreadyPrompted; } viewHistory() { diff --git a/libs/angular/src/vault/components/view.component.ts b/libs/angular/src/vault/components/view.component.ts index 8915cb6b671..fd3f92c6c73 100644 --- a/libs/angular/src/vault/components/view.component.ts +++ b/libs/angular/src/vault/components/view.component.ts @@ -95,7 +95,7 @@ export class ViewComponent implements OnDestroy, OnInit { cipherType = CipherType; private previousCipherId: string; - private passwordReprompted = false; + protected passwordReprompted = false; /** * Represents TOTP information including display formatting and timing