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:
@@ -9,6 +9,7 @@ import {
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
Output,
|
||||
SimpleChanges,
|
||||
} from "@angular/core";
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
async ngOnChanges() {
|
||||
async ngOnChanges(changes: SimpleChanges) {
|
||||
if (this.cipher?.decryptionFailure) {
|
||||
DecryptionFailureDialogComponent.open(this.dialogService, {
|
||||
cipherIds: [this.cipherId as CipherId],
|
||||
@@ -138,6 +139,12 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro
|
||||
return;
|
||||
}
|
||||
this.passwordReprompted = this.masterPasswordAlreadyPrompted;
|
||||
|
||||
if (changes["cipherId"]) {
|
||||
if (changes["cipherId"].currentValue !== changes["cipherId"].previousValue) {
|
||||
this.showPrivateKey = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
viewHistory() {
|
||||
|
||||
Reference in New Issue
Block a user