mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 06:52:04 +00:00
fix(pwa): fail offline mutations fast instead of pausing + silent write loss
Mutations ran in TanStack's default 'online' network mode, which PAUSES a write fired offline: isPending stays true forever, onError never fires, and the paused mutation is dropped on reload — a health entry vanishes with no 'not saved' signal. Switch mutations to 'always' network mode so an offline write rejects immediately and the form surfaces an honest failure, and add a global OfflineMutationToaster backstop for call sites without their own onError. Correct the offline banner copy, which promised changes would auto-save.
This commit is contained in:
1 parent
a53dd2b59c
commit
081bb2289d
9 files changed
+144
-18
No files matched your search
+2
-1
@@ -210,7 +210,8 @@
|
||||
"backToDashboard": "Zurück zum Dashboard"
|
||||
},
|
||||
"offlineBanner": {
|
||||
"message": "Keine Verbindung — Änderungen werden gespeichert, sobald du wieder online bist.",
|
||||
"message": "Keine Verbindung — Änderungen können erst gespeichert werden, wenn du wieder online bist.",
|
||||
"saveFailed": "Speichern fehlgeschlagen — du bist offline. Bitte versuche es erneut, sobald du wieder online bist.",
|
||||
"showingCached": "Zeigt deine zuletzt synchronisierten Daten."
|
||||
},
|
||||
"demoBanner": {
|
||||
|
||||
+2
-1
@@ -210,7 +210,8 @@
|
||||
"backToDashboard": "Back to dashboard"
|
||||
},
|
||||
"offlineBanner": {
|
||||
"message": "No connection — your changes will save once you're back online.",
|
||||
"message": "No connection — changes can't be saved until you're back online.",
|
||||
"saveFailed": "Couldn't save — you're offline. Please try again once you're back online.",
|
||||
"showingCached": "Showing your last synced data."
|
||||
},
|
||||
"demoBanner": {
|
||||
|
||||
+2
-1
@@ -210,7 +210,8 @@
|
||||
"backToDashboard": "Volver al panel"
|
||||
},
|
||||
"offlineBanner": {
|
||||
"message": "Sin conexión — tus cambios se guardarán cuando vuelvas a estar en línea.",
|
||||
"message": "Sin conexión — los cambios no se pueden guardar hasta que vuelvas a estar en línea.",
|
||||
"saveFailed": "No se pudo guardar — estás sin conexión. Inténtalo de nuevo cuando vuelvas a estar en línea.",
|
||||
"showingCached": "Mostrando tus últimos datos sincronizados."
|
||||
},
|
||||
"demoBanner": {
|
||||
|
||||
+2
-1
@@ -210,7 +210,8 @@
|
||||
"backToDashboard": "Retour au tableau de bord"
|
||||
},
|
||||
"offlineBanner": {
|
||||
"message": "Pas de connexion — tes modifications seront enregistrées dès que tu seras de nouveau en ligne.",
|
||||
"message": "Pas de connexion — les modifications ne peuvent pas être enregistrées tant que tu n'es pas de nouveau en ligne.",
|
||||
"saveFailed": "Enregistrement impossible — tu es hors ligne. Réessaie une fois de nouveau en ligne.",
|
||||
"showingCached": "Affichage de tes dernières données synchronisées."
|
||||
},
|
||||
"demoBanner": {
|
||||
|
||||
+2
-1
@@ -210,7 +210,8 @@
|
||||
"backToDashboard": "Torna alla dashboard"
|
||||
},
|
||||
"offlineBanner": {
|
||||
"message": "Nessuna connessione — le tue modifiche verranno salvate appena torni online.",
|
||||
"message": "Nessuna connessione — le modifiche non possono essere salvate finché non torni online.",
|
||||
"saveFailed": "Impossibile salvare — sei offline. Riprova quando torni online.",
|
||||
"showingCached": "Vengono mostrati i tuoi ultimi dati sincronizzati."
|
||||
},
|
||||
"demoBanner": {
|
||||
|
||||
+2
-1
@@ -210,7 +210,8 @@
|
||||
"backToDashboard": "Powrót do panelu"
|
||||
},
|
||||
"offlineBanner": {
|
||||
"message": "Brak połączenia — twoje zmiany zostaną zapisane, gdy ponownie pojawisz się online.",
|
||||
"message": "Brak połączenia — zmian nie można zapisać, dopóki nie wrócisz online.",
|
||||
"saveFailed": "Nie udało się zapisać — jesteś offline. Spróbuj ponownie, gdy wrócisz online.",
|
||||
"showingCached": "Wyświetlane są ostatnio zsynchronizowane dane."
|
||||
},
|
||||
"demoBanner": {
|
||||
|
||||
Reference in new issue
Block a user