Add EntitySelect/IconSelect UI improvements across modals

- Portal IconSelect popups to document.body with position:fixed to prevent
  clipping by modal overflow-y:auto
- Replace custom scene selectors in automation editor with EntitySelect
  command-palette pickers (main scene + fallback scene)
- Add IconSelect grid for automation deactivation mode (none/revert/fallback)
- Add IconSelect grid for automation condition type and match type
- Replace mapped zone source dropdowns with EntitySelect pickers
- Replace scene target selector with EntityPalette.pick() pattern
- Remove effect palette preview bar from CSS editor
- Remove sensitivity badge from audio color strip source cards
- Clean up unused scene-selector CSS and scene-target-add-row CSS
- Add locale keys for all new UI elements across en/ru/zh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 16:00:30 +03:00
parent 186940124c
commit 2712c6682e
32 changed files with 1204 additions and 391 deletions

View File

@@ -49,7 +49,7 @@ class ColorStripSourceCreate(BaseModel):
"""Request to create a color strip source."""
name: str = Field(description="Source name", min_length=1, max_length=100)
source_type: Literal["picture", "static", "gradient", "color_cycle", "effect", "composite", "mapped", "audio", "api_input", "notification"] = Field(default="picture", description="Source type")
source_type: Literal["picture", "picture_advanced", "static", "gradient", "color_cycle", "effect", "composite", "mapped", "audio", "api_input", "notification"] = Field(default="picture", description="Source type")
# picture-type fields
picture_source_id: str = Field(default="", description="Picture source ID (for picture type)")
brightness: float = Field(default=1.0, description="Brightness multiplier (0.0-2.0)", ge=0.0, le=2.0)

View File

@@ -34,9 +34,31 @@ class DeviceUpdate(BaseModel):
zone_mode: Optional[str] = Field(None, description="OpenRGB zone mode: combined or separate")
class CalibrationLineSchema(BaseModel):
"""One LED line in advanced calibration."""
picture_source_id: str = Field(description="Picture source (monitor) to sample from")
edge: Literal["top", "right", "bottom", "left"] = Field(description="Screen edge to sample")
led_count: int = Field(ge=1, description="Number of LEDs in this line")
span_start: float = Field(default=0.0, ge=0.0, le=1.0, description="Start fraction along edge")
span_end: float = Field(default=1.0, ge=0.0, le=1.0, description="End fraction along edge")
reverse: bool = Field(default=False, description="Reverse LED direction")
border_width: int = Field(default=10, ge=1, le=100, description="Sampling depth in pixels")
class Calibration(BaseModel):
"""Calibration configuration for pixel-to-LED mapping."""
mode: Literal["simple", "advanced"] = Field(
default="simple",
description="Calibration mode: simple (4-edge) or advanced (multi-source lines)"
)
# Advanced mode: ordered list of lines
lines: Optional[List[CalibrationLineSchema]] = Field(
default=None,
description="Line list for advanced mode (ignored in simple mode)"
)
# Simple mode fields
layout: Literal["clockwise", "counterclockwise"] = Field(
default="clockwise",
description="LED strip layout direction"

View File

@@ -23,11 +23,12 @@ class ScenePresetCreate(BaseModel):
class ScenePresetUpdate(BaseModel):
"""Update scene preset metadata (not snapshot data — use recapture for that)."""
"""Update scene preset metadata and optionally change which targets are included."""
name: Optional[str] = Field(None, min_length=1, max_length=100)
description: Optional[str] = Field(None, max_length=500)
order: Optional[int] = None
target_ids: Optional[List[str]] = Field(None, description="Update target list: keep state for existing, capture fresh for new, drop removed")
class ScenePresetResponse(BaseModel):