mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
Replace toaster library (#1322)
This commit is contained in:
@@ -6,11 +6,10 @@ import {
|
||||
ViewChild,
|
||||
} 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';
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
|
||||
import { PaymentRequest } from 'jslib-common/models/request/paymentRequest';
|
||||
|
||||
@@ -36,7 +35,7 @@ export class AdjustPaymentComponent {
|
||||
formPromise: Promise<any>;
|
||||
|
||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||
private toasterService: ToasterService, private logService: LogService) { }
|
||||
private platformUtilsService: PlatformUtilsService, private logService: LogService) { }
|
||||
|
||||
async submit() {
|
||||
try {
|
||||
@@ -59,7 +58,7 @@ export class AdjustPaymentComponent {
|
||||
}
|
||||
});
|
||||
await this.formPromise;
|
||||
this.toasterService.popAsync('success', null, this.i18nService.t('updatedPaymentMethod'));
|
||||
this.platformUtilsService.showToast('success', null, this.i18nService.t('updatedPaymentMethod'));
|
||||
this.onAdjusted.emit();
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
|
||||
Reference in New Issue
Block a user