diff --git a/src/lib/components/ui/LiveIndicator.svelte b/src/lib/components/ui/LiveIndicator.svelte
new file mode 100644
index 0000000..6900b66
--- /dev/null
+++ b/src/lib/components/ui/LiveIndicator.svelte
@@ -0,0 +1,49 @@
+
+
+
\ No newline at end of file
diff --git a/src/routes/board/+page.svelte b/src/routes/board/+page.svelte
index 3ae0990..a3fd113 100644
--- a/src/routes/board/+page.svelte
+++ b/src/routes/board/+page.svelte
@@ -6,8 +6,10 @@
import { formatUkDateTime, formatUkTime } from '$lib/utils/time';
import StaffServicesTable from '$lib/components/ui/station-board/StaffServicesTable.svelte';
+ import LiveIndicator from '$lib/components/ui/LiveIndicator.svelte';
let { data } = $props();
let now = $state(new Date());
+ let live = $state(false);
// Handle auto-refreshing & Wake-lock
$effect(() => {
@@ -46,8 +48,10 @@
await invalidateAll();
} catch (error) {
console.error("Background data fetch failed: ", error)
+ live = false;
}
}, 61000);
+ live = true;
console.log("Polling started")
};
@@ -107,12 +111,14 @@ $effect(() => {
// Load Data Invalidation Handling
// Refresh countdown logic
-
Updated: {formatUkDateTime(data.boardData.producedAt, true)}
{formatUkTime(now, true)}
+ {#if live}
+
+ {/if}
{#if data.boardData.data.m?.length}
{/if}