mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Unify satellite navigation to dashboard
This commit is contained in:
15
app.py
15
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()]
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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' %}
|
||||
<a href="/satellite/dashboard" class="mode-nav-btn {{ is_active }}" style="text-decoration: none;" data-mode="{{ mode }}" data-mode-label="{{ label }}" aria-label="{{ label }} mode">
|
||||
<span class="nav-icon icon">{{ icon_svg | safe }}</span>
|
||||
<span class="nav-label">{{ label }}</span>
|
||||
</a>
|
||||
{%- elif href %}
|
||||
<a href="{{ href }}" class="mode-nav-btn {{ is_active }}" style="text-decoration: none;" data-mode="{{ mode }}" data-mode-label="{{ label }}" aria-label="{{ label }} mode">
|
||||
<span class="nav-icon icon">{{ icon_svg | safe }}</span>
|
||||
<span class="nav-label">{{ label }}</span>
|
||||
@@ -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' %}
|
||||
<a href="/satellite/dashboard" class="mobile-nav-btn {{ is_active }}" style="text-decoration: none;" data-mode="{{ mode }}" data-mode-label="{{ label }}" aria-label="{{ label }} mode">
|
||||
<span class="icon icon--sm">{{ icon_svg | safe }}</span> {{ label }}
|
||||
</a>
|
||||
{%- elif href %}
|
||||
<a href="{{ href }}" class="mobile-nav-btn {{ is_active }}" style="text-decoration: none;" data-mode="{{ mode }}" data-mode-label="{{ label }}" aria-label="{{ label }} mode">
|
||||
<span class="icon icon--sm">{{ icon_svg | safe }}</span> {{ label }}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user