fix(dashboard): selection bar surfaces 'pick 1 more' hint when 1 display selected so the disabled Create Video Wall button isn't silently unresponsive

This commit is contained in:
ScreenTinker 2026-05-11 22:56:15 -05:00
parent b6c90d3421
commit a77ab365dd

View file

@ -420,9 +420,14 @@ function refreshSelectionBar() {
const n = selectedDeviceIds.size;
if (n === 0) { bar.style.display = 'none'; return; }
bar.style.display = 'flex';
count.textContent = `${n} display${n === 1 ? '' : 's'} selected`;
// Need at least 2 to make a wall
document.getElementById('createWallBtn').disabled = n < 2;
// Need at least 2 to make a wall - surface the constraint inline so the
// greyed-out button isn't just silently unresponsive.
count.textContent = n < 2
? `${n} display selected - pick 1 more to create a wall`
: `${n} displays selected`;
const btn = document.getElementById('createWallBtn');
btn.disabled = n < 2;
btn.title = n < 2 ? 'Select at least 2 displays to create a video wall' : '';
}
// Pick a sensible default grid for n devices: prefer near-square layouts,