feat(offline): offline-mode state, Settings toggle + blue chrome (Phase C) #195
Reference in New Issue
Block a user
Delete Branch "feature/offline-mode-state"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First Phase C step of PWA offline mode — the deliberate offline mode is now visible. An installed web-PWA user with a confirmed email can switch to offline in Settings; the header turns blue with an "Offline" chip. (Network gating, the dict preload + toggle readiness, the offline lobby + local-game creation, and the service-worker precache follow.)
offline.ts/offline.svelte.ts: a sticky, device-scoped reactiveofflineModeflag (distinct fromconnection.svelte's transient reachability), with pure persistence + readiness helpers (offlineReady/missingDicts) unit-tested.Settings.svelte: an Online / Offline toggle, shown only for an installed web PWA with a confirmed email.Header.svelte: a blue-tinted nav (color-mixfrom the accent, so it tracks light/dark + a Telegram theme override) + an "Offline" chip while offline; the deliberate mode suppresses the transient "Connecting…" indicator.Behaviour-preserving online (the toggle is hidden and offlineMode false there). Local verify green: check + test:unit + build + bundle gate (111.6/112 KB) + e2e (196 passed). Best reviewed live on the contour (install the PWA, confirm email, toggle offline).