Repository navigation
Replies: 1 comment
|
Thank you for the suggestion. In v0.10.14-alpha, the light or dark mode and the color scheme are saved with the account, so they are kept after signing out and on other devices and browsers. For existing accounts, nothing is saved until the mode or the scheme is changed, and until then, the current setting of each browser is used. Each setting is saved separately: when the color scheme is changed on one device, the dark mode on other devices is not affected. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
'Choose Color Scheme' and 'Light/Dark' modes under the 'User Menu' are not stored in the user preferences.
When a user logs out, clears the browser cache, or starts a new private session, these settings are reset to default (blue/orange theme).
Users lose their preferred color scheme and dark mode setting across sessions.
Affected Version
v0.10.13-alpha
Requested Feature
Persist the 'Choose Color Scheme' and 'Light/Dark' mode settings as user preferences so they survive:
Possible Implementation
Database Schema: Add two new fields to the
Usermodel:is_dark_mode(Boolean, default: false)current_color_scheme(String, default: 'blue')Backend Endpoint: Update
/api/user/preferences(POST) to accept and save:is_dark_mode(bool)current_color_scheme(string, enum: 'blue', 'emerald', 'purple', 'rose', 'amber', 'teal')Profile API Response: Include
is_dark_modeandcurrent_color_schemein the profile response (currently returned by/api/user/profile).Frontend Initialization: On app startup, load these preferences from the backend (fallback to localStorage if not present).
Theme Application: Ensure the theme is applied consistently when the user opens the app after a session termination.
Expected Behavior
Additional Context
The frontend already has the necessary UI components (
useColorSchemeanduseDarkMode) and localStorage persistence.The missing piece is backend persistence. Once these fields are added to the User model and the API, the feature will work seamlessly.
All reactions