1
0
mirror of https://github.com/bitwarden/web synced 2026-01-08 03:23:29 +00:00

Remove dead code (#930)

* Remove last remnants of old analytics code
This commit is contained in:
Oscar Hinton
2021-04-14 23:43:40 +02:00
committed by GitHub
parent 53bd9a3b14
commit a9ef011cf3
60 changed files with 107 additions and 299 deletions

View File

@@ -7,7 +7,6 @@ import {
} from '@angular/core';
import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
import { CipherService } from 'jslib/abstractions/cipher.service';
import { EventService } from 'jslib/abstractions/event.service';
@@ -41,10 +40,10 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
actionPromise: Promise<any>;
userHasPremiumAccess = false;
constructor(searchService: SearchService, protected analytics: Angulartics2,
protected toasterService: ToasterService, protected i18nService: I18nService,
protected platformUtilsService: PlatformUtilsService, protected cipherService: CipherService,
protected eventService: EventService, protected totpService: TotpService, protected userService: UserService) {
constructor(searchService: SearchService, protected toasterService: ToasterService,
protected i18nService: I18nService, protected platformUtilsService: PlatformUtilsService,
protected cipherService: CipherService, protected eventService: EventService,
protected totpService: TotpService, protected userService: UserService) {
super(searchService);
this.pageSize = 200;
}
@@ -58,7 +57,6 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
}
launch(uri: string) {
this.platformUtilsService.eventTrack('Launched Login URI');
this.platformUtilsService.launchUri(uri);
}
@@ -94,7 +92,6 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
try {
this.actionPromise = this.deleteCipher(c.id, permanent);
await this.actionPromise;
this.analytics.eventTrack.next({ action: 'Deleted Cipher' });
this.toasterService.popAsync('success', null, this.i18nService.t(permanent ? 'permanentlyDeletedItem'
: 'deletedItem'));
this.refresh();
@@ -117,7 +114,6 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
try {
this.actionPromise = this.cipherService.restoreWithServer(c.id);
await this.actionPromise;
this.analytics.eventTrack.next({ action: 'Restored Cipher' });
this.toasterService.popAsync('success', null, this.i18nService.t('restoredItem'));
this.refresh();
} catch { }
@@ -131,7 +127,6 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
value = await this.totpService.getCode(value);
}
this.analytics.eventTrack.next({ action: 'Copied ' + aType.toLowerCase() + ' from listing.' });
this.platformUtilsService.copyToClipboard(value, { window: window });
this.toasterService.popAsync('info', null,
this.i18nService.t('valueCopied', this.i18nService.t(typeI18nKey)));