diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index cba9d334..e71f00c0 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -213,6 +213,22 @@ export class CommonService { toast.present(); } + public redToastPK(page: string, key: string) { + this.redToast(this.ts.trPK(page, key)); + } + + async redToast(message: string) { + const toast = await this.toastController.create({ + message: message, + showCloseButton: true, + position: 'middle', + duration: 2000, + color: 'danger', + closeButtonText: this.ts.trPK('general', 'close') + }); + toast.present(); + } + private loaderIsActive = false; async startLoadingOld() { this.stopLoading();