diff --git a/src/app/directives/fallback-src.directive.ts b/src/app/directives/fallback-src.directive.ts index db716f53c5..435fba4399 100644 --- a/src/app/directives/fallback-src.directive.ts +++ b/src/app/directives/fallback-src.directive.ts @@ -14,7 +14,7 @@ export class FallbackSrcDirective { constructor(private el: ElementRef) { } - @HostListener('error') OnError() { + @HostListener('error') onError() { this.el.nativeElement.src = this.appFallbackSrc; } } diff --git a/src/app/vault/ciphers.component.html b/src/app/vault/ciphers.component.html index eec16e883d..ff439253e9 100644 --- a/src/app/vault/ciphers.component.html +++ b/src/app/vault/ciphers.component.html @@ -10,7 +10,7 @@
- diff --git a/src/app/vault/ciphers.component.ts b/src/app/vault/ciphers.component.ts index 0a2bdfbda7..e223777a6d 100644 --- a/src/app/vault/ciphers.component.ts +++ b/src/app/vault/ciphers.component.ts @@ -2,8 +2,10 @@ import * as template from './ciphers.component.html'; import { Component, + EventEmitter, Input, OnChanges, + Output, } from '@angular/core'; @Component({ @@ -12,6 +14,7 @@ import { }) export class CiphersComponent implements OnChanges { @Input() ciphers: any[]; + @Output() onCipherClicked = new EventEmitter(); constructor() { @@ -21,7 +24,7 @@ export class CiphersComponent implements OnChanges { } - viewCipher(cipher: any) { - console.log(cipher.id); + cipherClicked(cipher: any) { + this.onCipherClicked.emit(cipher); } } diff --git a/src/app/vault/vault.component.html b/src/app/vault/vault.component.html index 02411c930f..9dbd505560 100644 --- a/src/app/vault/vault.component.html +++ b/src/app/vault/vault.component.html @@ -1,5 +1,5 @@
- - + +
diff --git a/src/app/vault/vault.component.ts b/src/app/vault/vault.component.ts index e54bb7ba56..5ea70ea839 100644 --- a/src/app/vault/vault.component.ts +++ b/src/app/vault/vault.component.ts @@ -13,12 +13,18 @@ import { CipherService } from 'jslib/abstractions/cipher.service'; }) export class VaultComponent implements OnInit { ciphers: any[]; + cipher: any; + details: string; constructor(private cipherService: CipherService) { - } async ngOnInit() { this.ciphers = await this.cipherService.getAllDecrypted(); } + + viewCipher(cipher: any) { + this.cipher = cipher; + this.details = 'view'; + } } diff --git a/src/app/vault/view.component.html b/src/app/vault/view.component.html index 5f02bc6801..457b26bf8b 100644 --- a/src/app/vault/view.component.html +++ b/src/app/vault/view.component.html @@ -4,22 +4,22 @@
Item Information
-
+
Name - Google + {{cipher.name}}
URI - https://google.com + {{cipher.login.uri}}
Username - hello@bitwarden.com + {{cipher.login.username}}
Password - JKsiuhfLKJDOsudfhjksdfjk + {{cipher.login.password}}