Fix nested nav bar appearing in embedded dashboard iframes

When dashboards (satellite, ADS-B, AIS) are loaded via iframe with
?embedded=true, the full navigation bar was still rendered, creating
a "UI in UI" effect. Pass the embedded query param from route handlers
to templates and conditionally skip the nav include.

Fixes #144

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-22 13:16:51 +00:00
parent a8e2b9d98d
commit 5d4b61b4c3
7 changed files with 71 additions and 57 deletions

View File

@@ -944,10 +944,12 @@ def stream_adsb():
@adsb_bp.route('/dashboard')
def adsb_dashboard():
"""Popout ADS-B dashboard."""
embedded = request.args.get('embedded', 'false') == 'true'
return render_template(
'adsb_dashboard.html',
shared_observer_location=SHARED_OBSERVER_LOCATION_ENABLED,
adsb_auto_start=ADSB_AUTO_START,
embedded=embedded,
)