fix(config): mode select options are missing

This commit is contained in:
kunish 2024-08-22 18:00:55 +08:00
parent d8dcedd30c
commit 21a3aa169e
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
3 changed files with 3898 additions and 1396 deletions

View File

@ -37,7 +37,7 @@
"@thisbeyond/solid-dnd": "^0.7.5",
"@types/byte-size": "^8.1.2",
"@types/lodash": "^4.17.7",
"@types/node": "^22.4.1",
"@types/node": "^22.5.0",
"@types/uuid": "^10.0.0",
"@vite-pwa/assets-generator": "^0.2.4",
"apexcharts": "^3.52.0",
@ -51,7 +51,7 @@
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.5",
"is-ip": "^5.0.1",
"ky": "^1.7.0",
"ky": "^1.7.1",
"lint-staged": "^15.2.9",
"lodash": "^4.17.21",
"match-sorter": "^6.3.4",
@ -73,5 +73,5 @@
"vite-plugin-solid": "^2.10.2",
"zod": "^3.23.8"
},
"packageManager": "pnpm@9.7.0"
"packageManager": "pnpm@9.7.1"
}

5279
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -180,7 +180,7 @@ const ConfigForm = () => {
})
const modes = () => {
return configsData()?.modes || ["rule", "direct", "global"]
return configsData()?.modes || ['rule', 'direct', 'global']
}
return (
@ -192,9 +192,12 @@ const ConfigForm = () => {
void updateBackendConfigAPI('mode', e.target.value, refetch)
}
>
<For echo={modes()}>
<For each={modes()}>
{(name) => (
<option value={name}>{t(name) ?? name}</option>
<option value={name}>
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
{t(name as any) ?? name}
</option>
)}
</For>
</select>