From 423c40ff084b82f0fe3fd8cc1c285767b2abb07d Mon Sep 17 00:00:00 2001 From: UNITRONIX <36471318+UNITRONIX@users.noreply.github.com> Date: Tue, 7 Jul 2026 22:53:32 +0200 Subject: [PATCH] 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. --- web-nodejs/public/css/remote.css | 7 +++++-- web-nodejs/public/js/remote.js | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web-nodejs/public/css/remote.css b/web-nodejs/public/css/remote.css index ab3fedd9..9bfba4ca 100644 --- a/web-nodejs/public/css/remote.css +++ b/web-nodejs/public/css/remote.css @@ -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; } diff --git a/web-nodejs/public/js/remote.js b/web-nodejs/public/js/remote.js index 492d7e14..8adbbc4e 100644 --- a/web-nodejs/public/js/remote.js +++ b/web-nodejs/public/js/remote.js @@ -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);