add cipher view types

This commit is contained in:
Kyle Spearrin 2018-01-24 12:20:01 -05:00
parent f2923d9c81
commit 7e89a9ba3d
4 changed files with 13 additions and 13 deletions

View File

@ -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<any>();
@Input() ciphers: CipherView[];
@Output() onCipherClicked = new EventEmitter<CipherView>();
cipherClicked(cipher: any) {
cipherClicked(cipher: CipherView) {
this.onCipherClicked.emit(cipher);
}
}

View File

@ -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';
}

View File

@ -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) {
}

View File

@ -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;