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,
|
Output,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
|
import { CipherView } from 'jslib/models/view/cipherView';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-vault-ciphers',
|
selector: 'app-vault-ciphers',
|
||||||
template: template,
|
template: template,
|
||||||
})
|
})
|
||||||
export class CiphersComponent {
|
export class CiphersComponent {
|
||||||
@Input() ciphers: any[];
|
@Input() ciphers: CipherView[];
|
||||||
@Output() onCipherClicked = new EventEmitter<any>();
|
@Output() onCipherClicked = new EventEmitter<CipherView>();
|
||||||
|
|
||||||
cipherClicked(cipher: any) {
|
cipherClicked(cipher: CipherView) {
|
||||||
this.onCipherClicked.emit(cipher);
|
this.onCipherClicked.emit(cipher);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,15 @@ import {
|
|||||||
|
|
||||||
import { CipherService } from 'jslib/abstractions/cipher.service';
|
import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||||
|
|
||||||
|
import { CipherView } from 'jslib/models/view/cipherView';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-vault',
|
selector: 'app-vault',
|
||||||
template: template,
|
template: template,
|
||||||
})
|
})
|
||||||
export class VaultComponent implements OnInit {
|
export class VaultComponent implements OnInit {
|
||||||
ciphers: any[];
|
ciphers: CipherView[];
|
||||||
cipher: any;
|
cipher: CipherView;
|
||||||
details: string;
|
details: string;
|
||||||
|
|
||||||
constructor(private cipherService: CipherService) {
|
constructor(private cipherService: CipherService) {
|
||||||
@ -23,7 +25,7 @@ export class VaultComponent implements OnInit {
|
|||||||
this.ciphers = await this.cipherService.getAllDecrypted();
|
this.ciphers = await this.cipherService.getAllDecrypted();
|
||||||
}
|
}
|
||||||
|
|
||||||
viewCipher(cipher: any) {
|
viewCipher(cipher: CipherView) {
|
||||||
this.cipher = cipher;
|
this.cipher = cipher;
|
||||||
this.details = 'view';
|
this.details = 'view';
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,15 @@ import {
|
|||||||
|
|
||||||
import { CipherService } from 'jslib/abstractions/cipher.service';
|
import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||||
|
|
||||||
|
import { CipherView } from 'jslib/models/view/cipherView';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-vault-view',
|
selector: 'app-vault-view',
|
||||||
template: template,
|
template: template,
|
||||||
})
|
})
|
||||||
export class ViewComponent implements OnChanges {
|
export class ViewComponent implements OnChanges {
|
||||||
@Input() cipherId: string;
|
@Input() cipherId: string;
|
||||||
cipher: any;
|
cipher: CipherView;
|
||||||
|
|
||||||
constructor(private cipherService: CipherService) {
|
constructor(private cipherService: CipherService) {
|
||||||
}
|
}
|
||||||
|
@ -590,13 +590,7 @@ a {
|
|||||||
border-bottom: 1px solid $border-color;
|
border-bottom: 1px solid $border-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
padding-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
padding-bottom: 20px;
|
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
border: none;
|
border: none;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user