Files
TREK/client/tests
Maurice 33f6540ec3 feat(settings): keep the account's settings for a start without a connection
/api/settings is never cached, so an app started offline ran on
DEFAULT_SETTINGS until the server answered: Leaflet instead of the map
the user chose, and the default units. The answer the server gave last
time now stands in until the next one arrives.

- Dexie v18 adds accountSettings, one row in the signed-in user's own
  database, so another account on the device never reads it and logout
  deletes it with the database. The anonymous database never holds one.
  A new table only; the upgrade test covers it.
- loadSettings lays the kept answer over the defaults while nothing newer
  arrived and keeps every server answer. A key the server then leaves out
  goes back to its default, so the server stays the source of truth.
- A setting the server accepted is laid over the kept answer, so a change
  made online is what the next offline start shows. A refused save keeps
  nothing.

Keeping is best effort: where IndexedDB is refused the app starts on the
defaults as before.
2026-11-30 16:22:51 +01:00
..
2026-10-06 19:27:30 +02:00