[web] Design re-check: the engine chip closes its popover, Show details on every pause, popover grammar, share links off while Caddy serves, renewal copy

This commit is contained in:
2026-11-08 12:04:14 +01:00
parent 457aea86ca
commit 057abbc954
9 changed files with 32 additions and 8 deletions
+7 -1
View File
@@ -16,6 +16,7 @@
onclose,
escape = true,
closable = true,
toggle,
children,
footer,
}: {
@@ -26,6 +27,8 @@
onclose: () => void;
escape?: boolean;
closable?: boolean;
/** A popover's opener (a CSS selector): a click there is the opener's, which toggles it. */
toggle?: string;
children?: Snippet;
footer?: Snippet;
} = $props();
@@ -53,7 +56,10 @@
}
};
const down = (e: PointerEvent) => {
if (!modal && escape && el && e.target instanceof Node && !el.contains(e.target)) onclose();
if (!modal && escape && el && e.target instanceof Node && !el.contains(e.target)) {
if (toggle && e.target instanceof Element && e.target.closest(toggle)) return;
onclose();
}
};
document.addEventListener("keydown", key);
// On the next turn, so the click that opened the popover does not close it.