forked from open-webui/open-webui
Update theme options and persist OLED dark theme if selected
This commit is contained in:
parent
c24d9d3bea
commit
25c71d8ac2
2 changed files with 17 additions and 10 deletions
|
@ -9,7 +9,11 @@
|
|||
<script>
|
||||
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
|
||||
(() => {
|
||||
if (
|
||||
if (localStorage.theme.includes('oled')) {
|
||||
document.documentElement.style.setProperty('--color-gray-900', '#000000');
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
else if (
|
||||
localStorage.theme === 'light' ||
|
||||
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches)
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue