Files
KX-Bridge-Release/web
viewit 752f5c790c feat(ui): add power switch toggle to the Dashboard
User feedback: the power-control button for the smart-plug feature
was hard to find (only in the Printers tab, not the Dashboard where
users look first) and once found, easy to miss - a bare emoji icon
with no background/border, colored only via a muted gray/green text
color change.

Adds a "Steckdose"/Power Switch dashboard card with a segmented
An/Aus toggle styled like the print-speed selector (bordered pill,
accent-colored + tinted background when active) - much more visible
than a plain icon. Only rendered when the active printer has
power_on_url/power_off_url configured, mirroring the existing
has_power_control gating in the Printers tab. Reuses the existing
/kx/printers/{id}/power and power-status endpoints; the Printers-tab
button stays as-is for per-printer control in multi-printer setups.

Also handles the case where a user's saved GridStack dashboard layout
predates this card: initDashGrid() now appends any DASH_DEFAULT_LAYOUT
card missing from a saved layout instead of only updating matching
ids, so existing users get the new card without their custom layout
being wiped (which bumping DASH_LAYOUT_VERSION would otherwise do to
everyone).
2026-08-24 19:00:08 +02:00
..
2026-05-22 11:26:16 +02:00