forked from open-webui/open-webui
dynamically adjust --color-gray-950 value for OLED black sidebar
This commit is contained in:
parent
572eefe181
commit
67865fc5ad
3 changed files with 4 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
||||||
(() => {
|
(() => {
|
||||||
if (localStorage.theme.includes('oled')) {
|
if (localStorage.theme.includes('oled')) {
|
||||||
document.documentElement.style.setProperty('--color-gray-900', '#000000');
|
document.documentElement.style.setProperty('--color-gray-900', '#000000');
|
||||||
|
document.documentElement.style.setProperty('--color-gray-950', '#000000');
|
||||||
document.documentElement.classList.add('dark');
|
document.documentElement.classList.add('dark');
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
|
|
||||||
if (themeToApply === 'dark' && !_theme.includes('oled')) {
|
if (themeToApply === 'dark' && !_theme.includes('oled')) {
|
||||||
document.documentElement.style.setProperty('--color-gray-900', '#171717');
|
document.documentElement.style.setProperty('--color-gray-900', '#171717');
|
||||||
|
document.documentElement.style.setProperty('--color-gray-950', '#0d0d0d');
|
||||||
}
|
}
|
||||||
|
|
||||||
themes
|
themes
|
||||||
|
@ -121,6 +122,7 @@
|
||||||
localStorage.setItem('theme', _theme);
|
localStorage.setItem('theme', _theme);
|
||||||
if (_theme.includes('oled')) {
|
if (_theme.includes('oled')) {
|
||||||
document.documentElement.style.setProperty('--color-gray-900', '#000000');
|
document.documentElement.style.setProperty('--color-gray-900', '#000000');
|
||||||
|
document.documentElement.style.setProperty('--color-gray-950', '#000000');
|
||||||
document.documentElement.classList.add('dark');
|
document.documentElement.classList.add('dark');
|
||||||
}
|
}
|
||||||
applyTheme(_theme);
|
applyTheme(_theme);
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default {
|
||||||
800: '#333',
|
800: '#333',
|
||||||
850: '#262626',
|
850: '#262626',
|
||||||
900: 'var(--color-gray-900, #171717)',
|
900: 'var(--color-gray-900, #171717)',
|
||||||
950: '#0d0d0d'
|
950: 'var(--color-gray-950, #0d0d0d)'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
typography: {
|
typography: {
|
||||||
|
|
Loading…
Reference in a new issue