mirror of
https://github.com/screentinker/screentinker.git
synced 2026-05-15 07:32:23 -06:00
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:
parent
b6c90d3421
commit
a77ab365dd
|
|
@ -420,9 +420,14 @@ function refreshSelectionBar() {
|
||||||
const n = selectedDeviceIds.size;
|
const n = selectedDeviceIds.size;
|
||||||
if (n === 0) { bar.style.display = 'none'; return; }
|
if (n === 0) { bar.style.display = 'none'; return; }
|
||||||
bar.style.display = 'flex';
|
bar.style.display = 'flex';
|
||||||
count.textContent = `${n} display${n === 1 ? '' : 's'} selected`;
|
// Need at least 2 to make a wall - surface the constraint inline so the
|
||||||
// Need at least 2 to make a wall
|
// greyed-out button isn't just silently unresponsive.
|
||||||
document.getElementById('createWallBtn').disabled = n < 2;
|
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,
|
// Pick a sensible default grid for n devices: prefer near-square layouts,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue