diff --git a/status-board/src/app.css b/status-board/src/app.css index b5c61c9..736603f 100644 --- a/status-board/src/app.css +++ b/status-board/src/app.css @@ -1,3 +1,7 @@ @tailwind base; @tailwind components; @tailwind utilities; + +h1 { + @apply text-xl +} diff --git a/status-board/src/lib/Meal.svelte b/status-board/src/lib/Meal.svelte index f6ea497..3ec7620 100644 --- a/status-board/src/lib/Meal.svelte +++ b/status-board/src/lib/Meal.svelte @@ -1,7 +1,6 @@
"{meal.status.recipe}" ({meal.meal_id})
-{start_date.toLocaleString('de-DE', optionsTime)} - - {end_date.toLocaleString('de-DE', optionsTime)}
+ {#if !isAdmin}Status: - {#if meal.status.eta == 0 || (absolute_eta < Date.now() && meal.status.eta >= 0)} + {#if meal.status.start < Date.now()} + 🕒 Upcoming + {#if min_til_food < 5} + (Starting soon) + {:else if min_til_food < 60} + (Starting in {Math.ceil((meal.status.start * 1000 - Date.now())/100/60)}min ) + {:else} + (Starting at {start_date.toLocaleString('de-DE', optionsTime)}) + {/if} + {:else if meal.status.eta == 0 || (absolute_eta < Date.now() && meal.status.eta >= 0)} ✅ Serving {:else if meal.status.eta > 0}
⚠️ More is on the way, comming in about {Math.ceil((absolute_eta - Date.now())/1000/60)}min
@@ -59,7 +68,8 @@ {#each eta_update_variants as label} {/each} - + +Custom Message:
{/if} diff --git a/status-board/src/routes/+page.svelte b/status-board/src/routes/+page.svelte index e50b0dd..377f9ac 100644 --- a/status-board/src/routes/+page.svelte +++ b/status-board/src/routes/+page.svelte @@ -15,12 +15,21 @@ {#await fetch('https://essen.campus-kit.de/api/').then((x) => x.json())} Loading... (If you see this for more than a second, there is probably something wrong :0) -{:then meals.sort((/** @type {{ name: string; }} */ a, /** @type {{ name: any; }} */ b) => a.name.localeCompare(b.name)) as meal} -