Add multi-segment LED targets, replace single color strip source + skip fields

Each target now has a segments list where each segment maps a color strip
source to a pixel range (start/end) on the device with optional reverse.
This enables composing multiple visualizations on a single LED strip.
Old targets auto-migrate from the single source format on load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 12:49:26 +03:00
parent bbd2ac9910
commit 9d593379b8
14 changed files with 593 additions and 368 deletions

View File

@@ -447,9 +447,15 @@ function renderDashboardTarget(target, isRunning, devicesMap = {}, cssSourceMap
if (device) {
subtitleParts.push((device.device_type || '').toUpperCase());
}
const cssSource = target.color_strip_source_id ? cssSourceMap[target.color_strip_source_id] : null;
if (cssSource) {
subtitleParts.push(t(`color_strip.type.${cssSource.source_type}`) || cssSource.source_type);
const segments = target.segments || [];
if (segments.length > 0) {
const firstCss = cssSourceMap[segments[0].color_strip_source_id];
if (firstCss) {
subtitleParts.push(t(`color_strip.type.${firstCss.source_type}`) || firstCss.source_type);
}
if (segments.length > 1) {
subtitleParts.push(`${segments.length} seg`);
}
}
}