mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
add cipher view types
This commit is contained in:
parent
f2923d9c81
commit
7e89a9ba3d
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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';
|
||||
}
|
||||
|
@ -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) {
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user