diff --git a/frontend/src/routes/ScanPage.svelte b/frontend/src/routes/ScanPage.svelte new file mode 100644 index 0000000..0ecbfe3 --- /dev/null +++ b/frontend/src/routes/ScanPage.svelte @@ -0,0 +1,106 @@ + + +{#if error} +

{error}

+{:else if !scan} +

Loading…

+{:else} +
+

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

+ +
+ + {#if scan.status === 'queued'} +
+

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

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

Reading failed: {scan.error}

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

This scan was discarded.

+ {: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)} +
+ Download new events for {c.name} (.ics) +
+ {/each} + See the calendar +
+ {:else} + +
+ {#if confirmDiscard} + + + {:else} + + {/if} +
+ {/if} +{/if} + +