Add WebSocket device type, capability-driven settings, hide filter on collapse

- New WS device type: broadcaster singleton + LEDClient that sends binary
  frames to connected WebSocket clients during processing
- FastAPI WS endpoint at /api/v1/devices/{device_id}/ws with token auth
- Frontend: add/edit WS devices, connection URL with copy button in settings
- Add health_check and auto_restore capabilities to WLED and Serial providers;
  hide health interval and auto-restore toggle for devices without them
- Skip health check loop for virtual devices (Mock, MQTT, WS) — set always-online
- Copy buttons and labels for API CSS push endpoints (REST POST / WebSocket)
- Hide mock:// and ws:// URLs in target device dropdown
- Hide filter textbox when card section is collapsed (cs-collapsed CSS class)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 20:55:09 +03:00
parent 175a2c6c10
commit fa81d6a608
21 changed files with 375 additions and 16 deletions

View File

@@ -32,7 +32,7 @@ import {
showSettings, closeDeviceSettingsModal, forceCloseDeviceSettingsModal,
saveDeviceSettings, updateBrightnessLabel, saveCardBrightness,
turnOffDevice, removeDevice, loadDevices,
updateSettingsBaudFpsHint,
updateSettingsBaudFpsHint, copyWsUrl,
} from './features/devices.js';
import {
loadDashboard, stopUptimeTimer,
@@ -113,6 +113,7 @@ import {
onAudioVizChange,
applyGradientPreset,
cloneColorStrip,
copyEndpointUrl,
} from './features/color-strips.js';
// Layer 5: audio sources
@@ -201,6 +202,7 @@ Object.assign(window, {
removeDevice,
loadDevices,
updateSettingsBaudFpsHint,
copyWsUrl,
// dashboard
loadDashboard,
@@ -368,6 +370,7 @@ Object.assign(window, {
onAudioVizChange,
applyGradientPreset,
cloneColorStrip,
copyEndpointUrl,
// audio sources
showAudioSourceModal,