diff --git a/apps/web/src/components/EnginePopover.svelte b/apps/web/src/components/EnginePopover.svelte index 57f59f7..2d28610 100644 --- a/apps/web/src/components/EnginePopover.svelte +++ b/apps/web/src/components/EnginePopover.svelte @@ -72,7 +72,7 @@ } - +

Engine

{#if e?.state === "stopped"}

Visitors may not reach any host. Switching to {other} is the quickest way back.

@@ -80,7 +80,7 @@

{#if e?.since}Since {whenInline(e.since, app.now)}. {/if} {#if running === "pingora"} - {#if notReady}Caddy is not ready: its settings have not been built yet.{:else if differs > 0}Caddy is built with the same routes {whenInline(fr?.built_at, app.now)}, but {differs} of {fr?.compared} hosts behave differently on it.{:else}Caddy is ready with the same routes: built {whenInline(fr?.built_at, app.now)}{fr?.compared ? `, and all ${fr.compared} hosts behave the same` : ""}.{/if} + {#if notReady}Caddy is not ready: its settings have not been built yet.{:else if differs > 0}Caddy was built {whenInline(fr?.built_at, app.now)} with the same routes, but {differs} of {fr?.compared} {fr?.compared === 1 ? "host" : "hosts"} {differs === 1 ? "behaves" : "behave"} differently on it.{:else}Caddy is ready with the same routes: built {whenInline(fr?.built_at, app.now)}{fr?.compared ? (fr.compared === 1 ? ", and the host behaves the same" : `, and all ${fr.compared} hosts behave the same`) : ""}.{/if} {#if !notReady && !fr?.current} It is rebuilt from the current routes when you switch.{/if} {:else}Pingora is ready with the same routes.{/if}

diff --git a/apps/web/src/components/HostList.svelte b/apps/web/src/components/HostList.svelte index 70e0ea0..94a4554 100644 --- a/apps/web/src/components/HostList.svelte +++ b/apps/web/src/components/HostList.svelte @@ -89,7 +89,7 @@ } const blocked = $derived(changesBlocked()); - const shareReason = $derived(!app.overview?.site?.share_links_available ? (underCaddy ? "Share links are paused while Caddy serves." : "Share links are not set up on this server.") : null); + const shareReason = $derived(!app.overview?.site?.share_links_available ? (underCaddy ? "Share links are off while Caddy serves." : "Share links are not set up on this server.") : null);
diff --git a/apps/web/src/components/IntermediateBanner.svelte b/apps/web/src/components/IntermediateBanner.svelte index 6ea48a7..f11bf7c 100644 --- a/apps/web/src/components/IntermediateBanner.svelte +++ b/apps/web/src/components/IntermediateBanner.svelte @@ -46,7 +46,7 @@ {@const r = i.renewal} {#snippet title()} - Sign the renewal on the offline computer. Sign it by hand shows the files, the command and the fingerprint to check. + Sign the renewal on the offline computer. The next page has the files, the command and a fingerprint to check. {/snippet} The request stays open for {duration(secondsLeft(r.expires_at))}. {#if problem}{problem}{/if} {#snippet actions()} diff --git a/apps/web/src/components/ShareDialog.svelte b/apps/web/src/components/ShareDialog.svelte index 365baa3..4923ade 100644 --- a/apps/web/src/components/ShareDialog.svelte +++ b/apps/web/src/components/ShareDialog.svelte @@ -122,7 +122,7 @@ {#if link?.warning}

{link.warning.message}

{/if} {#if problem}{#snippet title()}{problem}{/snippet}{/if} {#if link} - + {:else if minting}

Making the link…

{/if} diff --git a/apps/web/src/components/TopBanners.svelte b/apps/web/src/components/TopBanners.svelte index 5594692..de8492a 100644 --- a/apps/web/src/components/TopBanners.svelte +++ b/apps/web/src/components/TopBanners.svelte @@ -35,6 +35,13 @@ return { bold: own, line2: "", extra: "" }; }); + // "Show details" for every pause (§7.6): the server's detail, the restart command, or the + // full message when there is nothing more. + const pauseDetail = $derived( + [o?.paused_detail, pause.extra].filter(Boolean).join("\n") || (o?.paused ? (o.paused.message ?? "") : ""), + ); + + async function retry() { await refresh(); } @@ -46,7 +53,7 @@ {#if pause.line2}{pause.line2}{/if} {#if restorable && o.undo?.target}

Goes back to "{o.undo.target.summary}" from {whenInline(o.undo.target.kept_at, app.now)}. It is checked like any change.

{/if} {#if problem}

{problem}

{/if} - {#if pause.extra}
{/if} + {#if pauseDetail}
{/if} {#snippet actions()} {#if restorable}{/if} {/snippet} diff --git a/apps/web/src/lib/types.ts b/apps/web/src/lib/types.ts index 009a2d6..73bffda 100644 --- a/apps/web/src/lib/types.ts +++ b/apps/web/src/lib/types.ts @@ -161,6 +161,7 @@ export interface Overview { site: { forward_auth_configured: boolean; acme_configured: boolean; secrets: string[]; watch_seconds: number; share_links_available: boolean; auth_logout_url?: string | null } | null; paused: Blocked | null; paused_reason: string | null; + paused_detail?: string | null; health_error: Blocked | null; rev: string | null; viewer?: { name: string; via: string } | null; diff --git a/apps/web/src/views/RenewByHand.svelte b/apps/web/src/views/RenewByHand.svelte index 4e88263..9be98c9 100644 --- a/apps/web/src/views/RenewByHand.svelte +++ b/apps/web/src/views/RenewByHand.svelte @@ -107,7 +107,7 @@

Step 2

Sign it on the offline computer

-

Copy both files to the offline computer that holds the Domi root, then run:

+

Copy both files to the offline computer that holds the Domi root.

First check that the request is the one this server made. This prints its fingerprint:

{checkCmd}
{#if r.csr_sha256}

openssl must print the same fingerprint as this page: {group(r.csr_sha256)}

{/if} diff --git a/apps/web/tests/flows.test.ts b/apps/web/tests/flows.test.ts index b666f8b..8a21e87 100644 --- a/apps/web/tests/flows.test.ts +++ b/apps/web/tests/flows.test.ts @@ -200,6 +200,16 @@ describe("focus", () => { await waitFor(() => expect(screen.queryByRole("button", { name: "Switch to Caddy" })).toBeNull()); expect(document.activeElement).toBe(screen.getByRole("button", { name: /^Engine: Pingora/ })); }); + + it("a click on the engine chip while its popover is open closes it", async () => { + start(); + const chip = await screen.findByRole("button", { name: /^Engine: Pingora/ }); + await click(chip); + await screen.findByRole("button", { name: "Switch to Caddy" }); + await new Promise((r) => setTimeout(r, 10)); + await click(chip); + await waitFor(() => expect(screen.queryByRole("button", { name: "Switch to Caddy" })).toBeNull()); + }); }); describe("sign-in and contact", () => { diff --git a/packages/ui/src/Dialog.svelte b/packages/ui/src/Dialog.svelte index e4dad8f..d1e3d14 100644 --- a/packages/ui/src/Dialog.svelte +++ b/packages/ui/src/Dialog.svelte @@ -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.