Add per-target protocol selection (DDP/HTTP) and reorganize target editor

- Add protocol field (ddp/http) to storage, API schemas, routes, processor
- WledTargetProcessor passes protocol to create_led_client(use_ddp=...)
- Target editor: protocol dropdown + keepalive in collapsible Specific Settings
- FPS, brightness threshold, adaptive FPS moved to main form area
- Hide Specific Settings section for serial devices (protocol is WLED-only)
- Card badge: show DDP/HTTP for WLED devices, Serial for serial devices

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 20:52:03 +03:00
parent cadef971e7
commit fda040ae18
11 changed files with 87 additions and 21 deletions

View File

@@ -367,6 +367,7 @@
"targets.section.devices": "💡 设备",
"targets.section.color_strips": "🎞️ 色带源",
"targets.section.targets": "⚡ 目标",
"targets.section.specific_settings": "特定设置",
"targets.add": "添加目标",
"targets.edit": "编辑目标",
"targets.loading": "正在加载目标...",
@@ -915,6 +916,9 @@
"targets.min_brightness_threshold.hint": "当有效输出亮度(像素亮度 × 设备/源亮度低于此值时LED完全关闭0 = 禁用)",
"targets.adaptive_fps": "自适应FPS",
"targets.adaptive_fps.hint": "当设备无响应时自动降低发送速率稳定后逐步恢复。推荐用于信号较弱的WiFi设备。",
"targets.protocol": "协议:",
"targets.protocol.hint": "DDP通过快速UDP发送像素推荐。HTTP使用JSON API——较慢但可靠限制约500个LED。",
"targets.protocol.serial": "串口",
"search.open": "搜索 (Ctrl+K)",
"search.placeholder": "搜索实体... (Ctrl+K)",