mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Fix: auto fetch after change in clashx
This commit is contained in:
parent
212e8707a0
commit
505e290beb
@ -9,14 +9,6 @@ import './style.scss'
|
||||
|
||||
const languageOptions: ButtonSelectOptions[] = [{ label: '中文', value: 'zh_CN' }, { label: 'English', value: 'en_US' }]
|
||||
|
||||
async function handleStartAtLoginChange (state: boolean) {
|
||||
await jsBridge.setStartAtLogin(state)
|
||||
}
|
||||
|
||||
async function handleSetSystemProxy (state: boolean) {
|
||||
await jsBridge.setSystemProxy(state)
|
||||
}
|
||||
|
||||
export default function Settings () {
|
||||
const { data: clashXData, fetch: fetchClashXData } = containers.useClashXData()
|
||||
const { data, fetch, unauthorized: { show } } = containers.useData()
|
||||
@ -48,6 +40,16 @@ export default function Settings () {
|
||||
}
|
||||
}
|
||||
|
||||
async function handleStartAtLoginChange (state: boolean) {
|
||||
await jsBridge.setStartAtLogin(state)
|
||||
fetchClashXData()
|
||||
}
|
||||
|
||||
async function handleSetSystemProxy (state: boolean) {
|
||||
await jsBridge.setSystemProxy(state)
|
||||
fetchClashXData()
|
||||
}
|
||||
|
||||
function changeLanguage (language: string) {
|
||||
setLang(language)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user