feat(fitness): cache more fitness shells & show unsynced workouts on history
Precache: - Service worker now precaches /fitness/workout(/active) shells (DE+EN) on install so a fresh device can log workouts offline without first visiting /fitness online. - Layout-level precache adds /fitness/__data.json itself plus the static sub-routes nutrition/meals and check-in/body-parts (DE+EN). Unsynced workouts on history: - History page reads the offline outbox via getQueuedSessions on mount and merges queued sessions into the displayed list, sorted by startTime. Duration is computed locally so the Clock stat still shows. - SessionCard gains an 'unsynced' prop: renders as a non-clickable div with an orange-accent border and a CloudOff badge labelled 'Unsynced' / 'Nicht synchronisiert'. - On window 'online', the page waits briefly for the layout's flushQueue to drain the outbox, then re-reads the queue and calls invalidateAll to swap unsynced placeholders for the now-saved server sessions.
This commit is contained in:
@@ -33,6 +33,7 @@ export const de = {
|
||||
weight: "Gewicht",
|
||||
history_title: "Verlauf",
|
||||
no_workouts_yet: "Noch keine Trainings. Starte dein erstes Training!",
|
||||
unsynced_label: "Nicht synchronisiert",
|
||||
load_more: "Mehr laden",
|
||||
date: "Datum",
|
||||
time: "Uhrzeit",
|
||||
|
||||
Reference in New Issue
Block a user