refactor(remote): adjust monitors menu display logic

- Updated CSS to ensure the monitors menu displays as a flex container only when open, improving layout consistency.
- Removed unnecessary JavaScript that displayed the monitors button by default, enhancing code clarity and functionality.
This commit is contained in:
UNITRONIX
2026-07-07 22:53:32 +02:00
parent 26b8dbb3a9
commit 423c40ff08
2 changed files with 5 additions and 5 deletions
+5 -2
View File
@@ -866,8 +866,6 @@
/* ---- Monitors & Virtual Displays ---- */
#monitors-menu.toolbar-dropdown-menu {
display: flex;
flex-direction: column;
min-width: 240px;
max-width: min(300px, calc(100vw - 24px));
max-height: min(75vh, calc(100dvh - 120px));
@@ -875,6 +873,11 @@
padding: 4px;
}
#monitors-menu.toolbar-dropdown-menu.open {
display: flex;
flex-direction: column;
}
#monitors-menu > .dropdown-label {
flex-shrink: 0;
}
-3
View File
@@ -1479,9 +1479,6 @@
// display support.
if (monitors.length < 2 && !(vd && vd.supported)) return;
const btn = document.getElementById('btn-monitors');
if (btn) btn.style.display = '';
const label = menu.querySelector('.dropdown-label');
menu.innerHTML = '';
if (label) menu.appendChild(label);