1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-20 10:13:43 +00:00

[Soft Delete] - cipher search rem deleted flag, filter array conditional

This commit is contained in:
Chad Scharf
2020-04-08 16:44:13 -04:00
parent 549fcc18ff
commit 3a10c1ff30
5 changed files with 63 additions and 20 deletions

View File

@@ -34,6 +34,7 @@ export class ViewComponent implements OnDestroy, OnInit {
@Input() cipherId: string;
@Output() onEditCipher = new EventEmitter<CipherView>();
@Output() onCloneCipher = new EventEmitter<CipherView>();
@Output() onRestoreCipher = new EventEmitter<CipherView>();
cipher: CipherView;
showPassword: boolean;
@@ -110,6 +111,13 @@ export class ViewComponent implements OnDestroy, OnInit {
this.onCloneCipher.emit(this.cipher);
}
restore() {
if (!this.cipher.isDeleted) {
return;
}
this.onRestoreCipher.emit(this.cipher);
}
togglePassword() {
this.platformUtilsService.eventTrack('Toggled Password');
this.showPassword = !this.showPassword;