mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-13 13:53:12 -06:00
Fix banners: prepend inside #app instead of inserting before it as sibling
Co-authored-by: ChrisChrome <28414320+ChrisChrome@users.noreply.github.com>
This commit is contained in:
parent
9f83832f7d
commit
4fe2552971
|
|
@ -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 = `<span>✉️ ${t('auth.verify_banner')}</span>`;
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue