1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-09-20 02:51:43 +02:00
bitwarden-desktop/src/app/vault/view.component.ts
2018-10-03 09:42:11 -04:00

51 lines
1.9 KiB
TypeScript

import {
ChangeDetectorRef,
Component,
EventEmitter,
NgZone,
OnChanges,
Output,
} from '@angular/core';
import { AuditService } from 'jslib/abstractions/audit.service';
import { CipherService } from 'jslib/abstractions/cipher.service';
import { CryptoService } from 'jslib/abstractions/crypto.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { TokenService } from 'jslib/abstractions/token.service';
import { TotpService } from 'jslib/abstractions/totp.service';
import { UserService } from 'jslib/abstractions/user.service';
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
import { ViewComponent as BaseViewComponent } from 'jslib/angular/components/view.component';
import { CipherView } from 'jslib/models/view/cipherView';
@Component({
selector: 'app-vault-view',
templateUrl: 'view.component.html',
})
export class ViewComponent extends BaseViewComponent implements OnChanges {
@Output() onViewCipherPasswordHistory = new EventEmitter<CipherView>();
constructor(cipherService: CipherService, totpService: TotpService,
tokenService: TokenService, i18nService: I18nService,
cryptoService: CryptoService, platformUtilsService: PlatformUtilsService,
auditService: AuditService, broadcasterService: BroadcasterService,
ngZone: NgZone, changeDetectorRef: ChangeDetectorRef,
userService: UserService) {
super(cipherService, totpService, tokenService, i18nService, cryptoService, platformUtilsService,
auditService, window, broadcasterService, ngZone, changeDetectorRef, userService);
}
async ngOnChanges() {
await super.load();
}
viewHistory() {
this.platformUtilsService.eventTrack('View Password History');
this.onViewCipherPasswordHistory.emit(this.cipher);
}
}