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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/4975
**Author:** [@sebdanielsson](https://github.com/sebdanielsson)
**Created:** 8/28/2024
**Status:** ✅ Merged
**Merged:** 8/30/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `automatic-theme-update`
---
### 📝 Commits (1)
- [`fd16129`](https://github.com/open-webui/open-webui/commit/fd1612935d1a912f31584c919fc7e6abc12186f5) Update color theme on system change
### 📊 Changes
**1 file changed** (+4 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `src/app.html` (+4 -0)
</details>
### 📄 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
- Update the app theme when the OS theme changes.
---
### 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
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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.