From 7e89a9ba3dd2b2708e3fe11f958a02f42ee86619 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 24 Jan 2018 12:20:01 -0500 Subject: [PATCH] add cipher view types --- src/app/vault/ciphers.component.ts | 8 +++++--- src/app/vault/vault.component.ts | 8 +++++--- src/app/vault/view.component.ts | 4 +++- src/scss/styles.scss | 6 ------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/app/vault/ciphers.component.ts b/src/app/vault/ciphers.component.ts index a3121681a4..3881ede2b1 100644 --- a/src/app/vault/ciphers.component.ts +++ b/src/app/vault/ciphers.component.ts @@ -7,15 +7,17 @@ import { Output, } from '@angular/core'; +import { CipherView } from 'jslib/models/view/cipherView'; + @Component({ selector: 'app-vault-ciphers', template: template, }) export class CiphersComponent { - @Input() ciphers: any[]; - @Output() onCipherClicked = new EventEmitter(); + @Input() ciphers: CipherView[]; + @Output() onCipherClicked = new EventEmitter(); - cipherClicked(cipher: any) { + cipherClicked(cipher: CipherView) { this.onCipherClicked.emit(cipher); } } diff --git a/src/app/vault/vault.component.ts b/src/app/vault/vault.component.ts index 5ea70ea839..926aee8cf7 100644 --- a/src/app/vault/vault.component.ts +++ b/src/app/vault/vault.component.ts @@ -7,13 +7,15 @@ import { import { CipherService } from 'jslib/abstractions/cipher.service'; +import { CipherView } from 'jslib/models/view/cipherView'; + @Component({ selector: 'app-vault', template: template, }) export class VaultComponent implements OnInit { - ciphers: any[]; - cipher: any; + ciphers: CipherView[]; + cipher: CipherView; details: string; constructor(private cipherService: CipherService) { @@ -23,7 +25,7 @@ export class VaultComponent implements OnInit { this.ciphers = await this.cipherService.getAllDecrypted(); } - viewCipher(cipher: any) { + viewCipher(cipher: CipherView) { this.cipher = cipher; this.details = 'view'; } diff --git a/src/app/vault/view.component.ts b/src/app/vault/view.component.ts index c05d34e207..17c52d9a61 100644 --- a/src/app/vault/view.component.ts +++ b/src/app/vault/view.component.ts @@ -8,13 +8,15 @@ import { import { CipherService } from 'jslib/abstractions/cipher.service'; +import { CipherView } from 'jslib/models/view/cipherView'; + @Component({ selector: 'app-vault-view', template: template, }) export class ViewComponent implements OnChanges { @Input() cipherId: string; - cipher: any; + cipher: CipherView; constructor(private cipherService: CipherService) { } diff --git a/src/scss/styles.scss b/src/scss/styles.scss index fe31344b22..5b2388ea42 100644 --- a/src/scss/styles.scss +++ b/src/scss/styles.scss @@ -590,13 +590,7 @@ a { border-bottom: 1px solid $border-color; } - &:first-child { - padding-top: 20px; - } - &:last-child { - padding-bottom: 20px; - &:before { border: none; height: 0;