mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
Replace toaster library (#1322)
This commit is contained in:
@@ -4,8 +4,6 @@ import {
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
|
||||
import { ToasterService } from 'angular2-toaster';
|
||||
|
||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
||||
@@ -14,6 +12,7 @@ import { EventService } from '../../services/event.service';
|
||||
|
||||
import { UserNamePipe } from 'jslib-angular/pipes/user-name.pipe';
|
||||
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
import { EventResponse } from 'jslib-common/models/response/eventResponse';
|
||||
import { ListResponse } from 'jslib-common/models/response/listResponse';
|
||||
|
||||
@@ -42,7 +41,7 @@ export class EntityEventsComponent implements OnInit {
|
||||
private orgUsersIdMap = new Map<string, any>();
|
||||
|
||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||
private eventService: EventService, private toasterService: ToasterService,
|
||||
private eventService: EventService, private platformUtilsService: PlatformUtilsService,
|
||||
private userNamePipe: UserNamePipe, private logService: LogService) { }
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -74,7 +73,7 @@ export class EntityEventsComponent implements OnInit {
|
||||
try {
|
||||
dates = this.eventService.formatDateFilters(this.start, this.end);
|
||||
} catch (e) {
|
||||
this.toasterService.popAsync('error', this.i18nService.t('errorOccurred'),
|
||||
this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'),
|
||||
this.i18nService.t('invalidDateRange'));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user