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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user