From 7d9692932f8adef091172ac86206471cb6a682d1 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Thu, 5 Nov 2026 17:41:33 -0600 Subject: [PATCH] Redesign scan page states --- frontend/src/routes/ScanPage.svelte | 123 ++++++++++++++++++---------- 1 file changed, 80 insertions(+), 43 deletions(-) diff --git a/frontend/src/routes/ScanPage.svelte b/frontend/src/routes/ScanPage.svelte index 0ecbfe3..1125e01 100644 --- a/frontend/src/routes/ScanPage.svelte +++ b/frontend/src/routes/ScanPage.svelte @@ -1,7 +1,16 @@ {#if error} -

{error}

+ + {:else if !scan} -

Loading…

-{:else} -
-

{scan.source_name} · {monthLabel(scan.hint_month)}

- +
+
+
+{:else} + + {#snippet actions()}{/snippet} + {#if scan.status === 'queued'} -
-

Reading the page. This usually takes under a minute; you can leave this screen.

-
+
+ +

Reading the page

+

This usually takes under a minute. You can leave this screen; the scan waits on the Scans tab.

+
{:else if scan.status === 'failed'} -
-

Reading failed: {scan.error}

+
+ +

Reading failed

+

{scan.error}

- - + +
-
+ {:else if scan.status === 'abandoned'} -

This scan was discarded.

+
+ +

Discarded

+

This scan was discarded. Nothing from it reached your calendar.

+
{:else if scan.status === 'published'} -
-

Published {scan.events.length} events{scan.menu_items.length ? ` and ${scan.menu_items.length} menu days` : ''}.

- {#if scan.layout_type === 'menu'} - Pick lunch days - {/if} - {#each calendars as c (c.id)} - - {/each} - See the calendar -
+
+ +

Published

+

+ {scan.events.length} {scan.events.length === 1 ? 'event' : 'events'}{scan.menu_items.length ? ` and ${scan.menu_items.length} menu days` : ''} are on your calendar. +

+
+ {#if scan.layout_type === 'menu'} + + {/if} + {#each calendars as c, i (c.id)} + + + {/each} + +
+
{:else}
{#if confirmDiscard} - - + + {:else} - + {/if}
{/if} {/if}