From 8f36cf94fc37e744e82add29c78cb2bf979d0af2 Mon Sep 17 00:00:00 2001 From: shuki Date: Wed, 4 Mar 2026 03:15:32 +0200 Subject: [PATCH] Revert toast styling back to original alert notifications Co-Authored-By: Claude Opus 4.6 --- whm/gniza-whm/remotes.cgi | 5 +---- whm/gniza-whm/setup.cgi | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/whm/gniza-whm/remotes.cgi b/whm/gniza-whm/remotes.cgi index cfeae10..7ff693b 100644 --- a/whm/gniza-whm/remotes.cgi +++ b/whm/gniza-whm/remotes.cgi @@ -712,13 +712,10 @@ function gnizaTestConnection() { } function gnizaToast(type, msg) { - var prev = document.getElementById('gniza-toast'); - if (prev) prev.remove(); var el = document.createElement('div'); - el.id = 'gniza-toast'; el.className = 'alert alert-' + type; - el.style.cssText = 'position:fixed;bottom:24px;right:24px;z-index:9999;max-width:400px;padding:12px 20px;border-radius:8px;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s'; el.textContent = msg; + el.style.cssText = 'position:fixed;top:24px;right:24px;z-index:9999;max-width:480px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s'; document.body.appendChild(el); setTimeout(function() { el.style.opacity = '0'; }, type === 'error' ? 6000 : 3000); setTimeout(function() { el.remove(); }, type === 'error' ? 6500 : 3500); diff --git a/whm/gniza-whm/setup.cgi b/whm/gniza-whm/setup.cgi index 5b1a5bf..f0a9be9 100644 --- a/whm/gniza-whm/setup.cgi +++ b/whm/gniza-whm/setup.cgi @@ -314,13 +314,10 @@ function gnizaTestConnection() { } function gnizaToast(type, msg) { - var prev = document.getElementById('gniza-toast'); - if (prev) prev.remove(); var el = document.createElement('div'); - el.id = 'gniza-toast'; el.className = 'alert alert-' + type; - el.style.cssText = 'position:fixed;bottom:24px;right:24px;z-index:9999;max-width:400px;padding:12px 20px;border-radius:8px;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s'; el.textContent = msg; + el.style.cssText = 'position:fixed;top:24px;right:24px;z-index:9999;max-width:480px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s'; document.body.appendChild(el); setTimeout(function() { el.style.opacity = '0'; }, type === 'error' ? 6000 : 3000); setTimeout(function() { el.remove(); }, type === 'error' ? 6500 : 3500);