feat(drone): add HTML partial, CSS, and index.html mode panel wiring

- Create templates/partials/modes/drone.html with drone mode sidebar panel
- Create static/css/modes/drone.css with scoped drone UI styles
- Wire drone mode into index.html: CSS map entry, partial include, classList toggle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-05-03 17:41:02 +01:00
parent 1a99a7213f
commit e059be2d84
3 changed files with 121 additions and 1 deletions
+74
View File
@@ -0,0 +1,74 @@
/* Drone Intelligence Styles */
.drone-vector-pills {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 4px;
}
.drone-vector-pill {
font-size: 10px;
font-family: var(--font-mono);
padding: 3px 8px;
border-radius: 3px;
background: var(--bg-primary);
color: var(--text-dim);
border: 1px solid var(--border-color);
transition: background 0.2s, color 0.2s;
}
.drone-vector-pill.active {
background: color-mix(in srgb, var(--accent-cyan) 15%, transparent);
color: var(--accent-cyan);
border-color: var(--accent-cyan);
}
.drone-contact-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 10px 12px;
margin-bottom: 8px;
cursor: pointer;
transition: border-color 0.15s;
}
.drone-contact-card:hover {
border-color: var(--accent-cyan);
}
.drone-contact-card.high-risk {
border-left: 3px solid var(--accent-red);
}
.drone-contact-card.medium-risk {
border-left: 3px solid var(--accent-yellow);
}
.drone-contact-card.low-risk {
border-left: 3px solid var(--accent-green);
}
.drone-compliance-badge {
font-size: 9px;
font-family: var(--font-mono);
padding: 2px 6px;
border-radius: 2px;
font-weight: 600;
text-transform: uppercase;
}
.drone-compliance-badge.compliant {
background: color-mix(in srgb, var(--accent-green) 20%, transparent);
color: var(--accent-green);
}
.drone-compliance-badge.non-compliant {
background: color-mix(in srgb, var(--accent-red) 20%, transparent);
color: var(--accent-red);
}
.drone-marker-high-risk {
animation: dsc-distress-pulse 1.5s infinite;
}
+5 -1
View File
@@ -102,7 +102,8 @@
radiosonde: "{{ url_for('static', filename='css/modes/radiosonde.css') }}",
meteor: "{{ url_for('static', filename='css/modes/meteor.css') }}",
system: "{{ url_for('static', filename='css/modes/system.css') }}",
ook: "{{ url_for('static', filename='css/modes/ook.css') }}"
ook: "{{ url_for('static', filename='css/modes/ook.css') }}",
drone: "{{ url_for('static', filename='css/modes/drone.css') }}"
};
window.INTERCEPT_MODE_STYLE_LOADED = {};
window.INTERCEPT_MODE_STYLE_PROMISES = {};
@@ -764,6 +765,8 @@
{% include 'partials/modes/ais.html' %}
{% include 'partials/modes/drone.html' %}
{% include 'partials/modes/radiosonde.html' %}
{% include 'partials/modes/spy-stations.html' %}
@@ -4625,6 +4628,7 @@
document.getElementById('aprsMode')?.classList.toggle('active', mode === 'aprs');
document.getElementById('tscmMode')?.classList.toggle('active', mode === 'tscm');
document.getElementById('aisMode')?.classList.toggle('active', mode === 'ais');
document.getElementById('droneMode')?.classList.toggle('active', mode === 'drone');
document.getElementById('radiosondeMode')?.classList.toggle('active', mode === 'radiosonde');
document.getElementById('spystationsMode')?.classList.toggle('active', mode === 'spystations');
document.getElementById('meshtasticMode')?.classList.toggle('active', mode === 'meshtastic');
+42
View File
@@ -0,0 +1,42 @@
<!-- DRONE INTELLIGENCE MODE -->
<div id="droneMode" class="mode-content" style="display: none;">
<div class="section">
<h3>Drone Intelligence</h3>
<p class="info-text" style="margin-bottom: 12px;">
Multi-vector UAV detection: Remote ID (WiFi/BLE), 433/868&nbsp;MHz control links, 2.4/5.8&nbsp;GHz wideband.
</p>
</div>
<div class="section">
<h3>Detection Vectors</h3>
<div id="droneVectorStatus" class="drone-vector-pills">
<span class="drone-vector-pill" id="dronePillRemoteId">Remote ID</span>
<span class="drone-vector-pill" id="dronePill433">433 MHz</span>
<span class="drone-vector-pill" id="dronePillHackrf">2.4 / 5.8 GHz</span>
</div>
</div>
<div class="section">
<h3>WiFi Interface <span style="font-weight:400; font-size:11px; color:var(--text-dim)">(monitor mode)</span></h3>
<input type="text" id="droneWifiIface" placeholder="e.g. wlan0mon" style="width:100%;">
</div>
<div class="section">
<div style="display:flex; gap:8px;">
<button id="droneStartBtn" class="run-btn" style="flex:1;">Start</button>
<button id="droneStopBtn" class="stop-btn" style="flex:1;" disabled>Stop</button>
</div>
</div>
<div class="section">
<h3>Status</h3>
<p class="info-text">
Status: <span id="droneStatusText" style="color:var(--accent-yellow);">Standby</span>
</p>
<p class="info-text">
Contacts: <span id="droneContactCount">0</span>
&nbsp;|&nbsp;
Non-compliant: <span id="droneNonCompliantCount" style="color:var(--accent-red);">0</span>
</p>
</div>
</div>