mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 11:42:19 +08:00
fix auto theme
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
This commit is contained in:
parent
2b0433ec41
commit
7e0f58d79d
|
@ -63,15 +63,14 @@ const App: React.FC = () => {
|
|||
}, [siderOrder])
|
||||
|
||||
useEffect(() => {
|
||||
setTheme(appTheme)
|
||||
if (appTheme === 'system') {
|
||||
setNativeTheme('system')
|
||||
}
|
||||
if (appTheme.includes('light')) {
|
||||
setNativeTheme('light')
|
||||
} else if (appTheme === 'system') {
|
||||
setNativeTheme('system')
|
||||
} else {
|
||||
setNativeTheme('dark')
|
||||
}
|
||||
setTheme(appTheme)
|
||||
}, [appTheme])
|
||||
|
||||
const onDragEnd = async (event: DragEndEvent): Promise<void> => {
|
||||
|
|
|
@ -82,15 +82,14 @@ const Settings: React.FC = () => {
|
|||
themeStr += `-${color}`
|
||||
}
|
||||
}
|
||||
setTheme(themeStr)
|
||||
if (themeStr === 'system') {
|
||||
setNativeTheme('system')
|
||||
}
|
||||
if (themeStr.includes('light')) {
|
||||
setNativeTheme('light')
|
||||
} else if (themeStr === 'system') {
|
||||
setNativeTheme('system')
|
||||
} else {
|
||||
setNativeTheme('dark')
|
||||
}
|
||||
setTheme(themeStr)
|
||||
patchAppConfig({ appTheme: themeStr as AppTheme })
|
||||
} else {
|
||||
let themeStr = theme
|
||||
|
|
Loading…
Reference in New Issue
Block a user