diff --git a/src/app/directives/fallback-src.directive.ts b/src/app/directives/fallback-src.directive.ts index db716f53..435fba43 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 eec16e88..ff439253 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 0a2bdfbd..e223777a 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 02411c93..9dbd5055 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 e54bb7ba..5ea70ea8 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 5f02bc68..457b26bf 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}}