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

[jslib] Updated shared components for cipher cloning (#60)

This commit is contained in:
Vincent Salucci
2020-01-28 16:19:50 -06:00
committed by GitHub
parent e1d42f95d9
commit 337a7ba59f
2 changed files with 25 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ const BroadcasterSubscriptionId = 'ViewComponent';
export class ViewComponent implements OnDestroy, OnInit {
@Input() cipherId: string;
@Output() onEditCipher = new EventEmitter<CipherView>();
@Output() onCloneCipher = new EventEmitter<CipherView>();
cipher: CipherView;
showPassword: boolean;
@@ -105,6 +106,10 @@ export class ViewComponent implements OnDestroy, OnInit {
this.onEditCipher.emit(this.cipher);
}
clone() {
this.onCloneCipher.emit(this.cipher);
}
togglePassword() {
this.platformUtilsService.eventTrack('Toggled Password');
this.showPassword = !this.showPassword;