diff --git a/public/admin-scripts.js b/public/admin-scripts.js index 1e234b3..acf4ff0 100644 --- a/public/admin-scripts.js +++ b/public/admin-scripts.js @@ -3,14 +3,26 @@ function showNotice(msg, isError) { if (!banner) return; banner.textContent = msg; banner.style.display = "block"; + banner.style.position = "fixed"; + banner.style.top = "1.25rem"; + banner.style.right = "1.25rem"; + banner.style.zIndex = "99999"; + banner.style.minWidth = "280px"; + banner.style.maxWidth = "480px"; + banner.style.padding = "0.85rem 1.25rem"; + banner.style.borderRadius = "var(--radius-md)"; + banner.style.boxShadow = "0 10px 25px -5px rgba(0, 0, 0, 0.35)"; + banner.style.fontSize = "0.9rem"; + banner.style.fontWeight = "600"; banner.style.background = isError ? "var(--danger-bg)" : "var(--success-bg)"; banner.style.color = isError ? "var(--danger-text)" : "var(--success-text)"; banner.style.border = isError ? "1px solid var(--danger-border)" : "1px solid var(--success-border)"; - setTimeout(() => { + if (banner._timeout) clearTimeout(banner._timeout); + banner._timeout = setTimeout(() => { banner.style.display = "none"; - }, 5000); + }, 4000); } globalThis.showNotice = showNotice; diff --git a/src/features/sessions/deck_fragments.tsx b/src/features/sessions/deck_fragments.tsx index 169f54b..fc86d7c 100644 --- a/src/features/sessions/deck_fragments.tsx +++ b/src/features/sessions/deck_fragments.tsx @@ -54,7 +54,6 @@ export const SessionDeckFragment = ({ diff --git a/src/features/sessions/table_fragments.tsx b/src/features/sessions/table_fragments.tsx index 22ff126..310f42e 100644 --- a/src/features/sessions/table_fragments.tsx +++ b/src/features/sessions/table_fragments.tsx @@ -113,7 +113,7 @@ export const SessionTableFragment = ({ type="button" class="btn-outline" style="padding: 0.25rem 0.5rem; font-size: 0.75rem; min-height: 30px;" - data-on-click={`@post("/api/sessions/${session.id}/extend")`} + onclick={`extendSession('${session.id}', 1)`} title="Extend session by 1 hour" > +1h @@ -135,7 +135,7 @@ export const SessionTableFragment = ({