diff --git a/app.py b/app.py index c9a6550..1628e8a 100644 --- a/app.py +++ b/app.py @@ -478,12 +478,15 @@ def login(): return render_template('login.html', version=VERSION) -@app.route('/') -def index() -> str: - tools = { - 'rtl_fm': check_tool('rtl_fm'), - 'multimon': check_tool('multimon-ng'), - 'rtl_433': check_tool('rtl_433'), +@app.route('/') +def index() -> str: + if request.args.get('mode') == 'satellite': + return redirect(url_for('satellite.dashboard')) + + tools = { + 'rtl_fm': check_tool('rtl_fm'), + 'multimon': check_tool('multimon-ng'), + 'rtl_433': check_tool('rtl_433'), 'rtlamr': check_tool('rtlamr') } devices = [d.to_dict() for d in SDRFactory.detect_devices()] diff --git a/templates/index.html b/templates/index.html index 9c58be9..6a3b723 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3604,6 +3604,10 @@ // Mode selection from welcome page function selectMode(mode) { + if (mode === 'satellite') { + window.location.href = '/satellite/dashboard'; + return; + } selectedStartMode = mode; const welcome = document.getElementById('welcomePage'); welcome.classList.add('fade-out'); @@ -3664,6 +3668,10 @@ function applyModeFromQuery() { const mode = getModeFromQuery(); if (!mode) return; + if (mode === 'satellite') { + window.location.replace('/satellite/dashboard'); + return; + } const accepted = localStorage.getItem('disclaimerAccepted') === 'true'; if (accepted) { const welcome = document.getElementById('welcomePage'); @@ -4395,6 +4403,10 @@ const switchStartMs = performance.now(); const previousMode = currentMode; if (mode === 'listening') mode = 'waterfall'; + if (mode === 'satellite') { + window.location.href = '/satellite/dashboard'; + return; + } if (!validModes.has(mode)) mode = 'pager'; const styleReadyPromise = (typeof window.ensureModeStyles === 'function') ? Promise.resolve(window.ensureModeStyles(mode)).catch((err) => { diff --git a/templates/partials/nav.html b/templates/partials/nav.html index 9f4e98e..e60eeed 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -16,7 +16,12 @@ {% macro mode_item(mode, label, icon_svg, href=None) -%} {%- set is_active = 'active' if active_mode == mode else '' -%} - {%- if href %} + {%- if mode == 'satellite' %} + + {{ icon_svg | safe }} + {{ label }} + + {%- elif href %} {{ icon_svg | safe }} {{ label }} @@ -36,7 +41,11 @@ {% macro mobile_item(mode, label, icon_svg, href=None) -%} {%- set is_active = 'active' if active_mode == mode else '' -%} - {%- if href %} + {%- if mode == 'satellite' %} + + {{ icon_svg | safe }} {{ label }} + + {%- elif href %} {{ icon_svg | safe }} {{ label }}