diff --git a/web_realart/public/control/control.css b/web_realart/public/control/control.css index cbbf3e8..f16ba6f 100644 --- a/web_realart/public/control/control.css +++ b/web_realart/public/control/control.css @@ -127,6 +127,9 @@ button.queued { animation: queued-blink 600ms ease-in-out infinite alternate; } border: 1px solid #335; border-radius: 6px; padding: 7px 6px; font-size: 14px; cursor: pointer; -webkit-appearance: none; appearance: none; } .mat-action-btn { width: auto; padding: 8px 14px; font-size: 14px; flex-shrink: 0; } +.mat-action-btn.armed { background: #2a4d2a; color: #9f9; border-color: #4a4; + animation: matArmedPulse 1s ease-in-out infinite; } +@keyframes matArmedPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } } .mat-refresh-btn { width: auto; padding: 8px 12px; font-size: 16px; flex-shrink: 0; background: #1a2a1a; border-color: #2a4a2a; color: #4d9; } .mvoice-label { position: sticky; left: 0; z-index: 2; background: #111; } diff --git a/web_realart/public/control/index.html b/web_realart/public/control/index.html index a1cae04..574439e 100644 --- a/web_realart/public/control/index.html +++ b/web_realart/public/control/index.html @@ -169,6 +169,7 @@ + diff --git a/web_realart/public/control/js/main.js b/web_realart/public/control/js/main.js index 3f86f78..ff0b2ea 100644 --- a/web_realart/public/control/js/main.js +++ b/web_realart/public/control/js/main.js @@ -116,6 +116,19 @@ document.addEventListener("DOMContentLoaded", () => { const n = document.getElementById("matrix-list").value; if (n) send("/matrix/load", n); }); + // Queued load: arm the selected preset to swap at the next loop wrap. + const matLoadNext = document.getElementById("matrix-loadnext"); + if (matLoadNext) matLoadNext.addEventListener("click", () => { + const n = document.getElementById("matrix-list").value; + if (n) send("/matrix/loadnext", n); + }); + on("/matrix/queued", (args) => { + const name = (args && args[0] != null) ? String(args[0]) : ""; + if (matLoadNext) { + matLoadNext.classList.toggle("armed", name.length > 0); + matLoadNext.textContent = name.length > 0 ? "SUIVANT → " + name : "SUIVANT"; + } + }); const matRefresh = document.getElementById("matrix-refresh"); if (matRefresh) matRefresh.addEventListener("click", () => send("/matrix/list")); });