From e414ba95e345038ba127cbc25362d31cb5060fd3 Mon Sep 17 00:00:00 2001 From: enadhilal Date: Tue, 7 Sep 2021 09:51:01 +0300 Subject: [PATCH] toast red --- .../hmg-common/services/common/common.service.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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();