mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #4975] [MERGED] fix: Update color theme on system change #8400
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/4975
Author: @sebdanielsson
Created: 8/28/2024
Status: ✅ Merged
Merged: 8/30/2024
Merged by: @tjbck
Base:
dev← Head:automatic-theme-update📝 Commits (1)
fd16129Update color theme on system change📊 Changes
1 file changed (+4 additions, -0 deletions)
View changed files
📝
src/app.html(+4 -0)📄 Description
Changelog Entry
Description
Currently, the theme logic uses the theme 'system' if nothing is found in the browser's local storage. However, when the system theme changes, the new theme isn't applied until the page is refreshed. By setting
localStorage.theme = 'system', the theme will now automatically update when the system theme changes.Fixed
Screenshots or Videos
Old behavior:
https://github.com/user-attachments/assets/9b849e12-49a0-4652-ae0b-a93a4c332994
New behavior:
https://github.com/user-attachments/assets/4eeed7e3-0b98-4728-9c0b-13a271e2b3af
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.