mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 21:42:58 +00:00
Update color theme on system change
This commit is contained in:
parent
6589450bd6
commit
fd1612935d
@ -22,6 +22,10 @@
|
||||
<script>
|
||||
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
|
||||
(() => {
|
||||
if (!localStorage?.theme) {
|
||||
localStorage.theme = 'system';
|
||||
}
|
||||
|
||||
if (localStorage?.theme && localStorage?.theme.includes('oled')) {
|
||||
document.documentElement.style.setProperty('--color-gray-800', '#101010');
|
||||
document.documentElement.style.setProperty('--color-gray-850', '#050505');
|
||||
|
Loading…
Reference in New Issue
Block a user