1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

load item view cipher

This commit is contained in:
Kyle Spearrin
2018-01-24 00:06:05 -05:00
parent 5703782a0f
commit b16ae24d58
7 changed files with 28 additions and 16 deletions

View File

@@ -6,18 +6,21 @@ import {
OnChanges,
} from '@angular/core';
import { CipherService } from 'jslib/abstractions/cipher.service';
@Component({
selector: 'app-vault-view',
template: template,
})
export class ViewComponent implements OnChanges {
@Input() cipherId: string;
cipher: any;
constructor() {
constructor(private cipherService: CipherService) {
}
ngOnChanges() {
async ngOnChanges() {
const cipher = await this.cipherService.get(this.cipherId);
this.cipher = await cipher.decrypt();
}
}