From 4edb73814ae4c4f759133d4c788edd763d7bc0ed Mon Sep 17 00:00:00 2001 From: samy Date: Wed, 13 Aug 2025 15:23:22 -1000 Subject: [PATCH] Add timeout customizatoin for notification toast --- .../views/components/notifications/event-toast.blade.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/views/components/notifications/event-toast.blade.php b/resources/views/components/notifications/event-toast.blade.php index 32a118e..9ea54b8 100644 --- a/resources/views/components/notifications/event-toast.blade.php +++ b/resources/views/components/notifications/event-toast.blade.php @@ -13,7 +13,11 @@ type: event.detail.type, }; - setTimeout(() => toast = null, 4000); + const delay = event.detail.timeout ?? 4000; + + if (delay > 0) { + setTimeout(() => toast = null, delay); + } }) " class="toast {{ $position }} z-50"