fix(web): make the 'connection lost' notice self-resolving

The notice promised 'this will clear once it's back', but nothing ever
removed it: the toast auto-hid on a 15s timer (not on recovery) and the
v0.9.0 unified inbox kept every notify() in persistent history, so the
notice lingered there forever.

Model it as a single live status instead: one sticky, transient (never
persisted) notice while the server is unreachable, removed the moment any
request reaches the server again. Adds a 'transient' notification flag
(sticky toast + excluded from history so a reload can't orphan it) and
replaces the throttled-toast helper with a connectivity lost/restored pair.
i18n the strings (errors.offline.*) in EN/HU/DE — they were hardcoded English.
This commit is contained in:
npeter83 2026-06-18 23:17:32 +02:00
parent 70b9be3fce
commit 37878068ea
5 changed files with 50 additions and 20 deletions

View file

@ -3,6 +3,10 @@
"generic": "The server couldn't carry out that action. Please try again.",
"server": "Server error",
"ok": "OK",
"offline": {
"title": "Connection lost",
"body": "Couldn't reach the server — it may be restarting. This notice will clear once the connection is back."
},
"boundary": {
"title": "Something went wrong.",
"subtitle": "The app hit an unexpected error.",