Files
PilotVault/Web App/server/dist/index.html
T
tajniak81andClaude Opus 4.8 94f6876024 Add location-aware automatic default bounding box
The OpenSky "Default bounding box" now follows where flying happens.
A new "Automatic" picker mode (the default) resolves the live-map area
from a location cascade — drone telemetry → phone GPS → browser
geolocation → the user's Region country → Europe — instead of a fixed
box. Manual presets and Custom coordinates still work.

- Web App: new shared countries.js dataset (all countries + bbox,
  offline point→country); the bbox picker gains all European countries
  and an Automatic option (client pref prefs.autoBbox); the Region
  setting expands from 6 locale entries to all countries; the live map
  resolves the cascade each poll and sends it as ?bbox=.
- API Server: the states endpoint accepts and validates a ?bbox=
  override (validBBox); the Web App BFF forwards the query; the hub
  relays new phoneLatitude/phoneLongitude telemetry to the Web App.
- Fly App: reports the phone's own GPS (geolocator) alongside
  telemetry, used as the "your location" fallback.
- API panel: the OpenSky bbox picker lists all European countries.

Builds verified across web, panel, both Go modules and the Fly App
APK. Region list, Automatic default and the cascade ?bbox= override
verified in the browser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 00:07:12 +02:00

45 lines
1.8 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap"
rel="stylesheet"
/>
<script>
// Apply saved theme + font size before first paint (light is the brand default).
(function () {
var GROUND = { light: '#EEF0F3', dark: '#0B1730' }
var FONT = { sm: 15, md: 16, lg: 18 }
var html = document.documentElement
var mode = 'light', prefs = {}
try {
mode = localStorage.getItem('pv_theme') || 'light'
} catch (e) {}
try {
prefs = JSON.parse(localStorage.getItem('pv_prefs') || '{}') || {}
} catch (e) {}
var t = mode
if (mode === 'system') {
t = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
}
html.setAttribute('data-theme', t)
html.style.backgroundColor = GROUND[t] || GROUND.light
html.style.fontSize = (FONT[prefs.fontSize] || 16) + 'px'
if (prefs.reduceMotion) html.classList.add('reduce-motion')
})()
</script>
<title>PilotVault — Control Panel</title>
<script type="module" crossorigin src="./assets/index-BSx6Lf8i.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-FLz21UuE.css">
</head>
<body>
<div id="app"></div>
</body>
</html>