mirror of
https://github.com/smittix/intercept.git
synced 2026-06-08 14:11:54 -07:00
410225d54d
- Device population: move refreshDroneDevices() inline to index.html
(same pattern as refreshTscmDevices) and call it from switchMode
alongside DroneMode.init(); remove _refreshDevices/populateSelect
from drone.js which was never guaranteed to run before lazy-load
completed, causing selects to stay on "Loading…" permanently
- IIFE pattern: change from named IIFE + window.DroneMode assignment
to var DroneMode = (function(){...return{...}})() matching OOK/
SpyStations convention
- Init guard: add _initialized flag (OOK state.initialized pattern);
re-entry after destroy() re-registers map/SSE cleanly without
duplicating click listeners on every mode switch
- Lifecycle: destroy() resets _initialized = false so map and SSE
are correctly rebuilt on re-entry
- Stop phase: add isDroneRunning tracking variable in index.html;
_setRunningUI() syncs it; switchMode stop phase now POSTs
/drone/stop when leaving drone mode while active, matching TSCM
- /drone/devices: add monitor_capable field to WiFi interfaces,
add running_as_root and warnings array to response (mirrors
/tscm/devices shape); add os import; show privilege warning div
in drone.html when not running as root
- drone.html: remove for= attribute from SDR label (plain <label>
inside .form-group matches TSCM convention); add droneDeviceWarnings
div for privilege warnings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
66 lines
2.4 KiB
HTML
66 lines
2.4 KiB
HTML
<!-- DRONE INTELLIGENCE MODE -->
|
|
<div id="droneMode" class="mode-content">
|
|
<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 MHz control links, 2.4/5.8 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</h3>
|
|
<div class="form-group">
|
|
<label>Interface (monitor mode)</label>
|
|
<select id="droneWifiIface">
|
|
<option value="">Loading interfaces…</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<h3>SDR Settings</h3>
|
|
<div class="form-group">
|
|
<label>RTL-SDR Device (433 MHz)</label>
|
|
<select id="droneRtlIndex">
|
|
<option value="">Loading devices…</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="inline-checkbox">
|
|
<input type="checkbox" id="droneUseHackrf" checked>
|
|
Use HackRF (2.4 / 5.8 GHz)
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="droneDeviceWarnings" class="info-text" style="display:none; color:var(--accent-yellow); font-size:10px; padding: 0 4px;"></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>
|
|
|
|
|
Non-compliant: <span id="droneNonCompliantCount" style="color:var(--accent-red);">0</span>
|
|
</p>
|
|
</div>
|
|
</div>
|