Add manual AMS slot selection for prints (#76)

- ReprintModal: Dropdown to override auto-matched AMS slots
- AddToQueueModal: Collapsible filament mapping section
- Backend: Store ams_mapping in print queue, apply when print starts
- Color names in dropdowns (decoded from Bambu codes or derived from hex)
- Blue ring indicator for manually selected vs auto-matched slots
- Status indicators: green (match), yellow (type only), orange (not found)

Closes #76

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
maziggy
2026-01-12 08:37:47 +01:00
co-authored by Claude Opus 4.5
parent e2ace4f946
commit ad4e4fc3a2
15 changed files with 1065 additions and 454 deletions
+4
View File
@@ -29,6 +29,10 @@ class PrintQueueItem(Base):
# Power management
auto_off_after: Mapped[bool] = mapped_column(Boolean, default=False) # Power off printer after print
# AMS mapping: JSON array of global tray IDs for each filament slot
# Format: "[5, -1, 2, -1]" where position = slot_id-1, value = global tray ID (-1 = unused)
ams_mapping: Mapped[str | None] = mapped_column(Text, nullable=True)
# Status: pending, printing, completed, failed, skipped, cancelled
status: Mapped[str] = mapped_column(String(20), default="pending")