mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
修改暗黑模式默认值
This commit is contained in:
parent
95074eb028
commit
594e871744
|
@ -44,19 +44,11 @@ export default function (props: any) {
|
|||
const theme = localStorage.getItem('qinglong_dark_theme') || 'auto';
|
||||
setFetchMethod(window.fetch);
|
||||
if (theme === 'dark') {
|
||||
enableDarkMode({
|
||||
brightness: 100,
|
||||
contrast: 90,
|
||||
sepia: 10,
|
||||
});
|
||||
enableDarkMode({});
|
||||
} else if (theme === 'light') {
|
||||
disableDarkMode();
|
||||
} else {
|
||||
followSystemColorScheme({
|
||||
brightness: 100,
|
||||
contrast: 90,
|
||||
sepia: 10,
|
||||
});
|
||||
followSystemColorScheme({});
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
|
|
@ -56,19 +56,11 @@ const Password = () => {
|
|||
useEffect(() => {
|
||||
setFetchMethod(window.fetch);
|
||||
if (theme === 'dark') {
|
||||
enableDarkMode({
|
||||
brightness: 100,
|
||||
contrast: 90,
|
||||
sepia: 10,
|
||||
});
|
||||
enableDarkMode({});
|
||||
} else if (theme === 'light') {
|
||||
disableDarkMode();
|
||||
} else {
|
||||
followSystemColorScheme({
|
||||
brightness: 100,
|
||||
contrast: 90,
|
||||
sepia: 10,
|
||||
});
|
||||
followSystemColorScheme({});
|
||||
}
|
||||
}, [theme]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user