From db7c5e048a186ec96caa87d293dac34c766fcf9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PROFERIS=20-=20Mi=C2=B3osz=20Stocki?= Date: Wed, 15 Jul 2026 14:32:49 +0200 Subject: [PATCH] Implement fake full-screen for board control. Requires testing #28 --- web/js/sections/board-control.js | 61 +++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/web/js/sections/board-control.js b/web/js/sections/board-control.js index 57813c9..0594ee8 100644 --- a/web/js/sections/board-control.js +++ b/web/js/sections/board-control.js @@ -14,6 +14,7 @@ let currentBg = localStorage.getItem('wiji_bg') || 'default'; let steps1 = 0; let steps2 = 0; let isManualPickMode = false; +let isFullscreen = false; function syncStateFromStorage() { isHomed = localStorage.getItem('wiji_homed') === 'true'; @@ -76,6 +77,32 @@ function buildHTML() { z-index: 10; pointer-events: none; } + .fullscreen-card { + position: fixed !important; + top: 0 !important; + left: 0 !important; + width: 100vw !important; + height: 100vh !important; + z-index: 9999 !important; + border-radius: 0 !important; + margin: 0 !important; + background: #111 !important; + display: flex; + flex-direction: column; + } + .fullscreen-card #map-container { + max-width: none !important; + height: 100% !important; + display: flex; + align-items: center; + justify-content: center; + } + .fullscreen-card #bg-image { + max-height: 100%; + width: auto !important; + max-width: 100%; + object-fit: contain; + }
@@ -86,12 +113,17 @@ function buildHTML() {
-
+
Interactive Map - +
+ + +
@@ -489,6 +521,27 @@ export default { }); } + // ── Full Screen Mode ────────────────────────────────────── + const btnFullscreen = document.getElementById('btn-fullscreen'); + const mapCard = document.getElementById('map-card'); + const fullscreenIcon = document.getElementById('fullscreen-icon'); + const fullscreenText = document.getElementById('fullscreen-text'); + + if (btnFullscreen && mapCard) { + btnFullscreen.addEventListener('click', () => { + isFullscreen = !isFullscreen; + if (isFullscreen) { + mapCard.classList.add('fullscreen-card'); + fullscreenIcon.textContent = '✖'; + fullscreenText.textContent = 'Exit'; + } else { + mapCard.classList.remove('fullscreen-card'); + fullscreenIcon.textContent = '⛶'; + fullscreenText.textContent = 'Full Screen'; + } + }); + } + // ── Sync Steps from BLE ─────────────────────────────────── const onBLEStatus = (e) => { const msg = e.detail;