1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

add/edit components setup

This commit is contained in:
Kyle Spearrin
2018-01-24 17:41:57 -05:00
parent 4f62792bda
commit 18a45886d1
11 changed files with 187 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ import { CipherView } from 'jslib/models/view/cipherView';
})
export class VaultComponent implements OnInit {
ciphers: CipherView[];
cipher: CipherView;
cipherId: string;
details: string;
constructor(private cipherService: CipherService) {
@@ -25,8 +25,17 @@ export class VaultComponent implements OnInit {
this.ciphers = await this.cipherService.getAllDecrypted();
}
viewCipher(cipher: CipherView) {
this.cipher = cipher;
viewCipher(id: string) {
this.cipherId = id;
this.details = 'view';
}
editCipher(id: string) {
this.cipherId = id;
this.details = 'edit';
}
addCipher() {
this.details = 'add';
}
}