mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-30 11:25:38 +08:00
feat: modes list for sing-box offical (#1182)
This commit is contained in:
parent
8c615f231e
commit
1ca89fb6c7
@ -232,9 +232,11 @@ const ConfigForm: ParentComponent<{
|
||||
}
|
||||
})
|
||||
|
||||
const modes = createMemo(
|
||||
() => configsData()?.modes || ['rule', 'direct', 'global'],
|
||||
)
|
||||
const modes = createMemo(() => {
|
||||
const cfg = configsData()
|
||||
|
||||
return cfg?.['mode-list'] || cfg?.modes || ['rule', 'direct', 'global']
|
||||
})
|
||||
|
||||
return (
|
||||
<div class="flex flex-col gap-4">
|
||||
|
3
src/types/index.d.ts
vendored
3
src/types/index.d.ts
vendored
@ -119,6 +119,9 @@ export type LogWithSeq = Log & { seq: number }
|
||||
|
||||
export type Config = {
|
||||
mode: string
|
||||
// sing-box added
|
||||
'mode-list': string[]
|
||||
// sing-box-p added
|
||||
modes?: string[]
|
||||
port: number
|
||||
'socks-port': number
|
||||
|
Loading…
Reference in New Issue
Block a user