From a92b4ef42c84c35360e9b3c21207d0e3e8e6ee4e Mon Sep 17 00:00:00 2001 From: Michael Reber Date: Mon, 9 Feb 2026 00:45:44 +0100 Subject: [PATCH] Make toast notifications duration setable in function --- pkg/web/static/js/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/web/static/js/core.js b/pkg/web/static/js/core.js index 3f87565..c18c13d 100644 --- a/pkg/web/static/js/core.js +++ b/pkg/web/static/js/core.js @@ -15,7 +15,7 @@ function showLoading(show) { } // Show toast notification -function showToast(message, type) { +function showToast(message, type, duration) { var container = document.getElementById('toast-container'); if (!container || !message) return; @@ -38,7 +38,7 @@ function showToast(message, type) { setTimeout(function() { toast.remove(); }, 300); - }, 5000); + }, duration || 5000); } // Show toast for ban event