1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

prevent showing ssh key when cipher changes in desktop view (#14913)

This commit is contained in:
Jordan Aasen
2025-05-27 10:05:58 -07:00
committed by GitHub
parent 5f169af08e
commit 677a435cad

View File

@@ -9,6 +9,7 @@ import {
OnDestroy, OnDestroy,
OnInit, OnInit,
Output, Output,
SimpleChanges,
} from "@angular/core"; } from "@angular/core";
import { ViewComponent as BaseViewComponent } from "@bitwarden/angular/vault/components/view.component"; import { ViewComponent as BaseViewComponent } from "@bitwarden/angular/vault/components/view.component";
@@ -130,7 +131,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId); this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
} }
async ngOnChanges() { async ngOnChanges(changes: SimpleChanges) {
if (this.cipher?.decryptionFailure) { if (this.cipher?.decryptionFailure) {
DecryptionFailureDialogComponent.open(this.dialogService, { DecryptionFailureDialogComponent.open(this.dialogService, {
cipherIds: [this.cipherId as CipherId], cipherIds: [this.cipherId as CipherId],
@@ -138,6 +139,12 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro
return; return;
} }
this.passwordReprompted = this.masterPasswordAlreadyPrompted; this.passwordReprompted = this.masterPasswordAlreadyPrompted;
if (changes["cipherId"]) {
if (changes["cipherId"].currentValue !== changes["cipherId"].previousValue) {
this.showPrivateKey = false;
}
}
} }
viewHistory() { viewHistory() {