From 4fe2552971f913f48beafb3147aacbe123cf58c5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Aug 2026 21:45:44 +0000 Subject: [PATCH] Fix banners: prepend inside #app instead of inserting before it as sibling Co-authored-by: ChrisChrome <28414320+ChrisChrome@users.noreply.github.com> --- frontend/js/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/js/app.js b/frontend/js/app.js index 8b3223a..6b2da45 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -613,7 +613,7 @@ function updateVerifyBanner(user) { if (!appEl || !appEl.parentNode) return; const b = document.createElement('div'); b.id = 'verifyBanner'; - b.style.cssText = 'background:var(--warning,#f59e0b);color:#1a1200;padding:9px 16px;font-size:13px;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin-left:var(--sidebar-width,220px)'; + b.style.cssText = 'background:var(--warning,#f59e0b);color:#1a1200;padding:9px 16px;font-size:13px;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap'; b.innerHTML = `✉️ ${t('auth.verify_banner')}`; const btn = document.createElement('button'); btn.className = 'btn btn-sm'; @@ -624,7 +624,7 @@ function updateVerifyBanner(user) { catch { showToast(t('auth.verify_resend_failed'), 'error'); } }); b.appendChild(btn); - appEl.parentNode.insertBefore(b, appEl); + appEl.prepend(b); } function updateWidgetSandboxWarningBanner(user) { @@ -636,7 +636,7 @@ function updateWidgetSandboxWarningBanner(user) { if (!appEl || !appEl.parentNode) return; const b = document.createElement('div'); b.id = 'widgetSandboxWarningBanner'; - b.style.cssText = 'background:var(--danger,#dc2626);color:#fff;padding:10px 16px;font-size:13px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;font-weight:600;margin-left:var(--sidebar-width,220px)'; + b.style.cssText = 'background:var(--danger,#dc2626);color:#fff;padding:10px 16px;font-size:13px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;font-weight:600'; const text = document.createElement('span'); text.style.whiteSpace = 'pre-line'; text.textContent = 'Widget sandbox isolation is DISABLED. Widget code in this organization runs\nwith full access to user sessions. Re-enable in Settings > Security.'; @@ -646,7 +646,7 @@ function updateWidgetSandboxWarningBanner(user) { link.style.cssText = 'color:#fff;text-decoration:underline;font-weight:700'; b.appendChild(text); b.appendChild(link); - appEl.parentNode.insertBefore(b, appEl); + appEl.prepend(b); } // Initialize