mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 00:32:05 +00:00
refac: code style
This commit is contained in:
parent
dfeadf9595
commit
cf44209730
@ -91,11 +91,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const applyTheme = (_theme: string) => {
|
const applyTheme = (_theme: string) => {
|
||||||
let themeToApply = _theme;
|
let themeToApply = _theme === 'oled-dark' ? 'dark' : _theme;
|
||||||
|
|
||||||
if (themeToApply.includes('oled')) {
|
|
||||||
themeToApply = 'dark';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_theme === 'system') {
|
if (_theme === 'system') {
|
||||||
themeToApply = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
themeToApply = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||||
|
Loading…
Reference in New Issue
Block a user