mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-17 14:03:15 +02:00
Make toast notifications duration setable in function
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user