mirror of
https://github.com/bitwarden/web
synced 2026-01-08 03:23:29 +00:00
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user