mirror of
https://github.com/bitwarden/desktop
synced 2025-12-27 21:53:14 +00:00
33 lines
696 B
TypeScript
33 lines
696 B
TypeScript
import * as template from './vault.component.html';
|
|
|
|
import {
|
|
Component,
|
|
OnInit,
|
|
} from '@angular/core';
|
|
|
|
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: CipherView[];
|
|
cipher: CipherView;
|
|
details: string;
|
|
|
|
constructor(private cipherService: CipherService) {
|
|
}
|
|
|
|
async ngOnInit() {
|
|
this.ciphers = await this.cipherService.getAllDecrypted();
|
|
}
|
|
|
|
viewCipher(cipher: CipherView) {
|
|
this.cipher = cipher;
|
|
this.details = 'view';
|
|
}
|
|
}
|