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

@@ -231,6 +231,92 @@
width: 100%;
}
/* Segment rows in target editor */
.segment-row {
border: 1px solid var(--border-color, #333);
border-radius: 6px;
padding: 8px 10px;
margin-bottom: 6px;
background: var(--card-bg, #1e1e1e);
}
.segment-row-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 6px;
}
.segment-index-label {
font-size: 0.8rem;
font-weight: 600;
color: #888;
}
.btn-icon-inline {
background: none;
border: none;
cursor: pointer;
font-size: 1.1rem;
padding: 0 4px;
line-height: 1;
}
.btn-danger-text {
color: var(--danger-color, #f44336);
}
.btn-danger-text:hover {
color: #ff6659;
}
.segment-row-fields {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
}
.segment-row-fields select {
flex: 1 1 100%;
}
.segment-range-fields {
display: flex;
gap: 6px;
align-items: center;
flex: 1;
}
.segment-range-fields label {
font-size: 0.82rem;
color: #aaa;
white-space: nowrap;
}
.segment-range-fields input[type="number"] {
width: 70px;
}
.segment-reverse-label {
display: flex;
align-items: center;
gap: 4px;
font-size: 0.85rem;
color: #aaa;
cursor: pointer;
white-space: nowrap;
}
.segment-reverse-label input[type="checkbox"] {
margin: 0;
}
.btn-sm {
font-size: 0.85rem;
padding: 4px 10px;
}
.fps-hint {
display: block;
margin-top: 4px;