[PR #4975] [MERGED] fix: Update color theme on system change #8400

Closed
opened 2025-11-11 17:55:35 -06:00 by GiteaMirror · 0 comments
Owner

📋 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: devHead: automatic-theme-update


📝 Commits (1)

  • fd16129 Update 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

  • 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


🔄 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>
GiteaMirror added the pull-request label 2025-11-11 17:55:35 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#8400