Remove target segments, use single color strip source per target
Segments are redundant now that the "mapped" CSS type handles spatial multiplexing internally. Each target now references one color_strip_source_id instead of an array of segments with start/end/reverse ranges. Backward compat: existing targets with old segments format are migrated on load by extracting the first segment's CSS source ID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -447,14 +447,11 @@ function renderDashboardTarget(target, isRunning, devicesMap = {}, cssSourceMap
|
||||
if (device) {
|
||||
subtitleParts.push((device.device_type || '').toUpperCase());
|
||||
}
|
||||
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`);
|
||||
const cssId = target.color_strip_source_id || '';
|
||||
if (cssId) {
|
||||
const css = cssSourceMap[cssId];
|
||||
if (css) {
|
||||
subtitleParts.push(t(`color_strip.type.${css.source_type}`) || css.source_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user