diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-10-18 21:26:24 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-10-18 21:26:24 +0200 |
| commit | 031f99e626f52ea7baac9155b0cbe6e4fcfbfb31 (patch) | |
| tree | 5c6851213527ce7c8f5945c56a11448c7e8fdeac /src/routes/+layout.svelte | |
| parent | 66939bab93cdcb9b7732c45d7bc3b99b6951fe15 (diff) | |
feat: poll server data so shared pages stay near-live
Refetch the current page every 15s while the tab is visible, gated by a
pure refresh policy: edit pages, hidden or offline tabs and in-flight
navigations are left alone. Replaces refresh-on-refocus with auto-refresh.
Diffstat (limited to 'src/routes/+layout.svelte')
| -rw-r--r-- | src/routes/+layout.svelte | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2956cd8..8a59b96 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -3,11 +3,11 @@ import { page } from '$app/stores'; import { onMount } from 'svelte'; import Nav from '$lib/components/Nav.svelte'; - import { refreshOnRefocus } from '$lib/refresh-on-refocus'; + import { startAutoRefresh } from '$lib/auto-refresh'; let { children } = $props(); - onMount(refreshOnRefocus); + onMount(startAutoRefresh); </script> <svelte:head> |
