mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
auto restart core
This commit is contained in:
parent
bb437f96a7
commit
9e078d78a5
@ -145,9 +145,14 @@ const MihomoConfig: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
selectedKeys={new Set([mihomoCpuPriority])}
|
selectedKeys={new Set([mihomoCpuPriority])}
|
||||||
onSelectionChange={async (v) => {
|
onSelectionChange={async (v) => {
|
||||||
|
try {
|
||||||
await patchAppConfig({
|
await patchAppConfig({
|
||||||
mihomoCpuPriority: v.currentKey as Priority
|
mihomoCpuPriority: v.currentKey as Priority
|
||||||
})
|
})
|
||||||
|
await restartCore()
|
||||||
|
} catch (e) {
|
||||||
|
alert(e)
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<SelectItem key="PRIORITY_HIGHEST">实时</SelectItem>
|
<SelectItem key="PRIORITY_HIGHEST">实时</SelectItem>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user