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

init functions

This commit is contained in:
Kyle Spearrin
2019-03-06 14:31:32 -05:00
parent 965e35604c
commit 199884e6ae
3 changed files with 47 additions and 35 deletions

View File

@@ -14,9 +14,7 @@ export class PasswordHistoryComponent implements OnInit {
protected i18nService: I18nService, private win: Window) { }
async ngOnInit() {
const cipher = await this.cipherService.get(this.cipherId);
const decCipher = await cipher.decrypt();
this.history = decCipher.passwordHistory == null ? [] : decCipher.passwordHistory;
await this.init();
}
copy(password: string) {
@@ -26,4 +24,10 @@ export class PasswordHistoryComponent implements OnInit {
this.platformUtilsService.showToast('info', null,
this.i18nService.t('valueCopied', this.i18nService.t('password')));
}
protected async init() {
const cipher = await this.cipherService.get(this.cipherId);
const decCipher = await cipher.decrypt();
this.history = decCipher.passwordHistory == null ? [] : decCipher.passwordHistory;
}
}