mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
init functions
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user