feat(web): 新增 HID OTG 自检接口与设置页环境诊断面板,并优化在线升级状态文案本地化及重启后自动刷新体验

This commit is contained in:
mofeng-git
2026-02-20 09:44:02 +08:00
parent ba1b5224ff
commit 5f03971579
6 changed files with 1318 additions and 11 deletions

View File

@@ -303,6 +303,28 @@ export const hidApi = {
screen_resolution: [number, number] | null
}>('/hid/status'),
otgSelfCheck: () =>
request<{
overall_ok: boolean
error_count: number
warning_count: number
hid_backend: string
selected_udc: string | null
bound_udc: string | null
udc_state: string | null
udc_speed: string | null
available_udcs: string[]
other_gadgets: string[]
checks: Array<{
id: string
ok: boolean
level: 'info' | 'warn' | 'error'
message: string
hint?: string
path?: string
}>
}>('/hid/otg/self-check'),
keyboard: async (type: 'down' | 'up', key: number, modifiers?: {
ctrl?: boolean
shift?: boolean