From cbf66d16b86ae1b3a86ee2d4a513298fd9397f4d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 30 Jul 2018 11:00:06 -0400 Subject: [PATCH] viewHistory event moved to desktop --- jslib | 2 +- src/app/vault/view.component.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/jslib b/jslib index b21cb789da..557b2fc3f0 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit b21cb789da2f93a36908cdfb0dba6e701102b87d +Subproject commit 557b2fc3f093ee1e2eb4515c2e33c613f083c327 diff --git a/src/app/vault/view.component.ts b/src/app/vault/view.component.ts index d11b55fe77..72aaf265da 100644 --- a/src/app/vault/view.component.ts +++ b/src/app/vault/view.component.ts @@ -1,6 +1,8 @@ import { Component, + EventEmitter, OnChanges, + Output, } from '@angular/core'; import { ToasterService } from 'angular2-toaster'; @@ -16,11 +18,15 @@ import { TotpService } from 'jslib/abstractions/totp.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(); + constructor(cipherService: CipherService, totpService: TotpService, tokenService: TokenService, toasterService: ToasterService, cryptoService: CryptoService, platformUtilsService: PlatformUtilsService, @@ -33,4 +39,9 @@ export class ViewComponent extends BaseViewComponent implements OnChanges { async ngOnChanges() { await super.load(); } + + viewHistory() { + this.analytics.eventTrack.next({ action: 'View Password History' }); + this.onViewCipherPasswordHistory.emit(this.cipher); + } }