1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

move eventTrack analytics to platform utils

This commit is contained in:
Kyle Spearrin
2018-10-03 00:03:49 -04:00
parent f793ff0aa5
commit ad31527b8d
20 changed files with 52 additions and 104 deletions

View File

@@ -1,7 +1,5 @@
import { Router } from '@angular/router';
import { Angulartics2 } from 'angulartics2';
import { CryptoService } from '../../abstractions/crypto.service';
import { I18nService } from '../../abstractions/i18n.service';
import { MessagingService } from '../../abstractions/messaging.service';
@@ -14,8 +12,7 @@ export class LockComponent {
protected successRoute: string = 'vault';
constructor(protected router: Router, protected analytics: Angulartics2,
protected i18nService: I18nService,
constructor(protected router: Router, protected i18nService: I18nService,
protected platformUtilsService: PlatformUtilsService, protected messagingService: MessagingService,
protected userService: UserService, protected cryptoService: CryptoService) { }
@@ -52,7 +49,7 @@ export class LockComponent {
}
togglePassword() {
this.analytics.eventTrack.next({ action: 'Toggled Master Password on Unlock' });
this.platformUtilsService.eventTrack('Toggled Master Password on Unlock');
this.showPassword = !this.showPassword;
document.getElementById('masterPassword').focus();
}