Add power toggle button to LED device cards

WLED: native on/off via JSON API. Adalight: sends all-black frame
to blank LEDs (uses existing client if target is running, otherwise
opens temporary serial connection). Toggle button placed next to
delete button in card top-right corner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 19:18:39 +03:00
parent f4503d36b4
commit cc91ccd75a
9 changed files with 193 additions and 4 deletions

View File

@@ -263,6 +263,39 @@ section {
}
.card-top-actions {
position: absolute;
top: 8px;
right: 8px;
display: flex;
align-items: center;
gap: 2px;
}
.card-top-actions .card-remove-btn {
position: static;
}
.card-power-btn {
background: none;
border: none;
color: #777;
font-size: 1rem;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-radius: 4px;
transition: color 0.2s, background 0.2s;
}
.card-power-btn:hover {
color: var(--primary-color);
background: rgba(76, 175, 80, 0.1);
}
.card-remove-btn {
position: absolute;
top: 10px;