From 872291b0a083ff2e1e245ebb5bee21debc86c6cb Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 26 May 2026 22:04:34 -0400 Subject: [PATCH] fix(launcher): replace Flowbite Modal with custom overlay for cfg panel Two problems with the Flowbite approach: 1. Built-in dismissable CloseButton rendered with no functional dismiss path (no title/form), appearing centered in the panel. 2. size="xl" (max-w-7xl) left no backdrop area on typical laptop screens, making outsideclose impossible to trigger. Replace with a simple custom overlay: full-screen backdrop div that closes on click, inner panel with stopPropagation. Matches the original Drawer pattern. close_cfg() writes to store immediately on backdrop click for reliable persistence independent of effect timing. Co-Authored-By: Claude Sonnet 4.6 --- .../(launcher)/launcher/+layout.svelte | 88 ++++++++++++------- 1 file changed, 55 insertions(+), 33 deletions(-) diff --git a/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte b/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte index d9a09fa7..65b94948 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte @@ -17,6 +17,7 @@ import { sineIn } from 'svelte/easing'; // *** Import other supporting libraries import { liveQuery } from 'dexie'; import { Drawer, Modal } from 'flowbite-svelte'; +import { fade } from 'svelte/transition'; import { listen, idle, onIdle, restartCountdown } from 'svelte-idle'; import { @@ -122,6 +123,15 @@ $effect(() => { }); }); +// Called by backdrop click. Writes to store immediately (don't rely on effect timing). +function close_cfg() { + modal_cfg_open = false; + events_loc.update((loc) => { + if (loc.launcher) loc.launcher.hide_drawer__cfg = true; + return loc; + }); +} + // Generate a stable per-device client ID on first load and persist it. // events_loc is backed by svelte-persisted-store (localStorage) so this // survives page reloads. Without this, client_id falls back to Date.now() @@ -928,41 +938,53 @@ $effect(() => { - - - +{#if modal_cfg_open} + +
- - - Session Search - - {#if $events_slct?.event_location_id} - - - View Selected Location - - {/if} - {#if $events_slct?.event_session_id} - - - View Selected Session - - {/if} + role="presentation" + class="fixed inset-0 z-50 flex items-center justify-center bg-gray-900/60 p-4" + onclick={close_cfg} + transition:fade={{ duration: 200 }}> + + +
-
+{/if}