From 18ef6218d8c9ad40e3d4cf2dde77be42b0608511 Mon Sep 17 00:00:00 2001 From: Smittix Date: Thu, 29 Jan 2026 16:03:41 +0000 Subject: [PATCH] fix: SSTV location settings and panel sizing - Fix GPS button not working (pass button element to handler) - Hide output element in SSTV mode to allow panels to fill space - Add explicit height rules for SSTV panels to expand vertically Co-Authored-By: Claude Opus 4.5 --- static/css/modes/sstv.css | 6 ++++-- static/js/core/settings-manager.js | 3 +-- templates/index.html | 2 +- templates/partials/settings-modal.html | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/static/css/modes/sstv.css b/static/css/modes/sstv.css index 9102b6d..4d35a00 100644 --- a/static/css/modes/sstv.css +++ b/static/css/modes/sstv.css @@ -20,6 +20,7 @@ padding: 16px; min-height: 0; flex: 1; + height: 100%; overflow: hidden; } @@ -30,8 +31,9 @@ display: flex; flex-direction: row; gap: 16px; - flex: 1; - min-height: 0; + flex: 1 1 auto; + min-height: 400px; + height: 100%; overflow: hidden; } diff --git a/static/js/core/settings-manager.js b/static/js/core/settings-manager.js index b67c834..e459f3f 100644 --- a/static/js/core/settings-manager.js +++ b/static/js/core/settings-manager.js @@ -570,7 +570,7 @@ function loadObserverLocation() { /** * Detect location using browser GPS */ -function detectLocationGPS() { +function detectLocationGPS(btn) { const latInput = document.getElementById('observerLatInput'); const lonInput = document.getElementById('observerLonInput'); @@ -584,7 +584,6 @@ function detectLocationGPS() { } // Show loading state - const btn = event.target.closest('button'); const originalText = btn.innerHTML; btn.innerHTML = 'Detecting...'; btn.disabled = true; diff --git a/templates/index.html b/templates/index.html index 9b782a4..2fbbdde 100644 --- a/templates/index.html +++ b/templates/index.html @@ -2584,7 +2584,7 @@ // Hide output console for modes with their own visualizations const outputEl = document.getElementById('output'); const statusBar = document.querySelector('.status-bar'); - if (outputEl) outputEl.style.display = (mode === 'satellite' || mode === 'aprs' || mode === 'wifi' || mode === 'bluetooth' || mode === 'listening' || mode === 'tscm' || mode === 'spystations' || mode === 'meshtastic') ? 'none' : 'block'; + if (outputEl) outputEl.style.display = (mode === 'satellite' || mode === 'sstv' || mode === 'aprs' || mode === 'wifi' || mode === 'bluetooth' || mode === 'listening' || mode === 'tscm' || mode === 'spystations' || mode === 'meshtastic') ? 'none' : 'block'; if (statusBar) statusBar.style.display = (mode === 'satellite') ? 'none' : 'flex'; // Restore sidebar when leaving Meshtastic mode (user may have collapsed it) diff --git a/templates/partials/settings-modal.html b/templates/partials/settings-modal.html index 5692f80..1fe7b6b 100644 --- a/templates/partials/settings-modal.html +++ b/templates/partials/settings-modal.html @@ -149,7 +149,7 @@
-