mirror of
https://github.com/smittix/intercept.git
synced 2026-07-13 20:18:10 -07:00
Fix mobile navigation and display issues
- Add APRS to mobile navigation bar (was missing) - Fix CSS that was forcing aircraft visuals to always display - Only apply flex layout to visuals when they are actually visible - Fix ADS-B dashboard mobile layout with proper flex ordering - Reset grid properties on mobile for proper stacking - Hide ACARS sidebar on mobile (desktop only feature)
This commit is contained in:
@@ -1046,27 +1046,35 @@ body {
|
|||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
/* Dashboard should be scrollable, not fixed height */
|
/* Dashboard should be scrollable, not fixed height */
|
||||||
.dashboard {
|
.dashboard {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
height: auto;
|
height: auto;
|
||||||
min-height: calc(100dvh - 60px);
|
min-height: calc(100dvh - 60px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Main display needs explicit height on mobile */
|
/* Main display needs explicit height on mobile - reset grid properties */
|
||||||
.main-display {
|
.main-display {
|
||||||
|
grid-column: auto;
|
||||||
|
grid-row: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
min-height: 300px;
|
min-height: 300px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
order: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Map container needs full dimensions */
|
/* Map container needs full dimensions */
|
||||||
.display-container {
|
.display-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#radarMap {
|
#radarMap {
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
|
width: 100% !important;
|
||||||
min-height: 300px;
|
min-height: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1081,8 +1089,18 @@ body {
|
|||||||
|
|
||||||
/* Sidebar should not be height restricted */
|
/* Sidebar should not be height restricted */
|
||||||
.sidebar {
|
.sidebar {
|
||||||
|
grid-column: auto;
|
||||||
|
grid-row: auto;
|
||||||
max-height: none;
|
max-height: none;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
order: 2;
|
||||||
|
border-left: none;
|
||||||
|
border-top: 1px solid rgba(74, 158, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide ACARS sidebar on mobile */
|
||||||
|
.acars-sidebar {
|
||||||
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Selected aircraft panel - compact on mobile */
|
/* Selected aircraft panel - compact on mobile */
|
||||||
@@ -1103,6 +1121,9 @@ body {
|
|||||||
|
|
||||||
/* Controls bar - wrap and stack */
|
/* Controls bar - wrap and stack */
|
||||||
.controls-bar {
|
.controls-bar {
|
||||||
|
order: 3;
|
||||||
|
grid-column: auto;
|
||||||
|
grid-row: auto;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|||||||
@@ -415,15 +415,26 @@
|
|||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Visual panels should stack in single column on mobile */
|
/* Visual panels should stack in single column on mobile when visible */
|
||||||
.wifi-visuals,
|
.wifi-visuals,
|
||||||
.bt-visuals,
|
.bt-visuals {
|
||||||
#aircraftVisuals {
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Only apply flex when aircraft visuals are shown (via JS setting display: grid) */
|
||||||
|
#aircraftVisuals[style*="grid"] {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-direction: column !important;
|
flex-direction: column !important;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* APRS visuals - only when visible */
|
||||||
|
#aprsVisuals[style*="flex"] {
|
||||||
|
flex-direction: column !important;
|
||||||
|
}
|
||||||
|
|
||||||
.wifi-visual-panel {
|
.wifi-visual-panel {
|
||||||
grid-column: auto !important;
|
grid-column: auto !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -431,6 +431,7 @@
|
|||||||
<button class="mobile-nav-btn active" data-mode="pager" onclick="switchMode('pager')">📟 Pager</button>
|
<button class="mobile-nav-btn active" data-mode="pager" onclick="switchMode('pager')">📟 Pager</button>
|
||||||
<button class="mobile-nav-btn" data-mode="sensor" onclick="switchMode('sensor')">📡 433MHz</button>
|
<button class="mobile-nav-btn" data-mode="sensor" onclick="switchMode('sensor')">📡 433MHz</button>
|
||||||
<button class="mobile-nav-btn" data-mode="aircraft" onclick="switchMode('aircraft')">✈️ Aircraft</button>
|
<button class="mobile-nav-btn" data-mode="aircraft" onclick="switchMode('aircraft')">✈️ Aircraft</button>
|
||||||
|
<button class="mobile-nav-btn" data-mode="aprs" onclick="switchMode('aprs')">📍 APRS</button>
|
||||||
<button class="mobile-nav-btn" data-mode="wifi" onclick="switchMode('wifi')">📶 WiFi</button>
|
<button class="mobile-nav-btn" data-mode="wifi" onclick="switchMode('wifi')">📶 WiFi</button>
|
||||||
<button class="mobile-nav-btn" data-mode="bluetooth" onclick="switchMode('bluetooth')">🔵 BT</button>
|
<button class="mobile-nav-btn" data-mode="bluetooth" onclick="switchMode('bluetooth')">🔵 BT</button>
|
||||||
<button class="mobile-nav-btn" data-mode="tscm" onclick="switchMode('tscm')">🔍 TSCM</button>
|
<button class="mobile-nav-btn" data-mode="tscm" onclick="switchMode('tscm')">🔍 TSCM</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user