From fa4b3d8df28f677343fe2f0d3dcc3f7ea5ca342c Mon Sep 17 00:00:00 2001 From: Roby Date: Sun, 1 Nov 2026 20:09:40 +0100 Subject: [PATCH] fix mode spacing --- static/js/app.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 6cd8dd3..3e98432 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -388,14 +388,20 @@ function renderModeToggles(clientId, statusMsg = "") { ? `border-color: ${m.color}; color: ${m.color} !important; box-shadow: inset 0 0 8px ${m.color}; font-weight: bold;` : `border-color: var(--border-light); color: var(--text-muted) !important; opacity: 0.4;`; - html += ``; + // Rimosso flex:1 per evitare che l'ultimo bottone si allarghi al 100% sulla riga vuota + html += ``; } }); - if (html === "") html = 'NO MODES FOUND IN CONFIG'; + if (html === "") { + html = 'NO MODES FOUND IN CONFIG'; + } else { + // Avvolgiamo i bottoni in una CSS Grid per un allineamento perfetto e proporzionato + html = `
${html}
`; + } if (statusMsg) { - html += `
${statusMsg}
`; + html += `
${statusMsg}
`; } container.innerHTML = html;