mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[CL-715] - [Defect] SSH key Private Key field visibility should toggle to hidden when switching items to view in desktop (#15224)
* fix sshKey visibility * add missing ngIf * use two-way binding over explicit key
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
bitIconButton
|
bitIconButton
|
||||||
bitPasswordInputToggle
|
bitPasswordInputToggle
|
||||||
data-testid="toggle-privateKey"
|
data-testid="toggle-privateKey"
|
||||||
|
[(toggled)]="revealSshKey"
|
||||||
></button>
|
></button>
|
||||||
<button
|
<button
|
||||||
bitIconButton="bwi-clone"
|
bitIconButton="bwi-clone"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// FIXME: Update this file to be type safe and remove this and next line
|
// FIXME: Update this file to be type safe and remove this and next line
|
||||||
// @ts-strict-ignore
|
// @ts-strict-ignore
|
||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component, Input } from "@angular/core";
|
import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
|
||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { SshKeyView } from "@bitwarden/common/vault/models/view/ssh-key.view";
|
import { SshKeyView } from "@bitwarden/common/vault/models/view/ssh-key.view";
|
||||||
@@ -27,6 +27,14 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only-
|
|||||||
IconButtonModule,
|
IconButtonModule,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class SshKeyViewComponent {
|
export class SshKeyViewComponent implements OnChanges {
|
||||||
@Input() sshKey: SshKeyView;
|
@Input() sshKey: SshKeyView;
|
||||||
|
|
||||||
|
revealSshKey = false;
|
||||||
|
|
||||||
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
|
if (changes["sshKey"]) {
|
||||||
|
this.revealSshKey = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user