Public Access
fix(settings): keep the language and save settings one after the other
This commit is contained in:
1 parent
14dd59f9e0
commit
f605917874
25 files changed
+423
-98
No files matched your search
@@ -67,6 +67,8 @@ To Be Played is split into three repositories:
|
||||
("Profile art" on a game's page). Visitors see the owner's look on that page only; light or dark mode stays theirs.
|
||||
- **Appearance**: accent color, corner style, wide layout, page background and banner from your own game art.
|
||||
Saved in Auth, so it follows you to every device.
|
||||
- **Language**: kept in the browser and saved in Auth; after the login Auth's language wins when one is saved. Dark
|
||||
mode stays per device.
|
||||
- **Broken pictures**: a Steam cover or achievement icon that does not load shows a placeholder and is reported
|
||||
to Core once per page load (`POST /api/library/broken-images`, only with a session). Core repairs it at night;
|
||||
a repaired cover comes back as `imageUrl`.
|
||||
@@ -130,6 +132,10 @@ flowchart LR
|
||||
- `src/utils/brokenImages.js` reports pictures that fail to load (`GameCover`, achievement icons on the game
|
||||
detail page) to Core.
|
||||
- `useLibrarySync` polls Core's `/api/library/sync-status` while a Steam sync runs, then loads the data again.
|
||||
- `PUT /api/users/settings` replaces dark mode, language, display name and public profile at once, so every save
|
||||
goes through `saveSettings` in `src/utils/settings.js`: one after the other, each on a fresh `GET /api/users/me`.
|
||||
- Pages keep a load error as its i18n key and translate it when rendering, so a language switch loads nothing
|
||||
again.
|
||||
|
||||
## Project structure
|
||||
|
||||
|
||||
Reference in new issue
Block a user