mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-14 18:35:34 +08:00
fix(config): options are not getting reflected in fav light/dark theme select, closes #1079
This commit is contained in:
parent
f2578c958d
commit
ae1158d957
@ -27,6 +27,13 @@ export const App: ParentComponent = ({ children }) => {
|
||||
const prefersDark = usePrefersDark()
|
||||
|
||||
createEffect(() => {
|
||||
console.log(
|
||||
autoSwitchTheme(),
|
||||
prefersDark(),
|
||||
favNightTheme(),
|
||||
favDayTheme(),
|
||||
)
|
||||
|
||||
if (autoSwitchTheme())
|
||||
setCurTheme(prefersDark() ? favNightTheme() : favDayTheme())
|
||||
})
|
||||
|
@ -492,13 +492,16 @@ const ConfigForXd = () => {
|
||||
<ConfigTitle>{t('favDayTheme')}</ConfigTitle>
|
||||
|
||||
<Select
|
||||
value={favDayTheme()}
|
||||
onChange={(e) =>
|
||||
setFavDayTheme(e.target.value as (typeof themes)[number])
|
||||
}
|
||||
>
|
||||
<For each={themes}>
|
||||
{(theme) => <option value={theme}>{theme}</option>}
|
||||
{(theme) => (
|
||||
<option selected={favDayTheme() === theme} value={theme}>
|
||||
{theme}
|
||||
</option>
|
||||
)}
|
||||
</For>
|
||||
</Select>
|
||||
</div>
|
||||
@ -507,13 +510,16 @@ const ConfigForXd = () => {
|
||||
<ConfigTitle>{t('favNightTheme')}</ConfigTitle>
|
||||
|
||||
<Select
|
||||
value={favNightTheme()}
|
||||
onChange={(e) =>
|
||||
setFavNightTheme(e.target.value as (typeof themes)[number])
|
||||
}
|
||||
>
|
||||
<For each={themes}>
|
||||
{(theme) => <option value={theme}>{theme}</option>}
|
||||
{(theme) => (
|
||||
<option selected={favNightTheme() === theme} value={theme}>
|
||||
{theme}
|
||||
</option>
|
||||
)}
|
||||
</For>
|
||||
</Select>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user