mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 22:59:59 -07:00
Refactor timeline as reusable ActivityTimeline component
- Extract signal-timeline into configurable activity-timeline.js - Add visual modes: compact, enriched, summary - Create data adapters for RF, Bluetooth, WiFi normalization - Integrate timeline into Listening Post, Bluetooth, WiFi modes - Preserve backward compatibility for existing TSCM code - Add mode-specific configuration presets via adapters Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -691,6 +691,25 @@ function addSignalHit(data) {
|
||||
|
||||
const hitCount = document.getElementById('scannerHitCount');
|
||||
if (hitCount) hitCount.textContent = `${tbody.children.length} signals found`;
|
||||
|
||||
// Feed to activity timeline if available
|
||||
if (typeof addTimelineEvent === 'function') {
|
||||
const normalized = typeof RFTimelineAdapter !== 'undefined'
|
||||
? RFTimelineAdapter.normalizeSignal({
|
||||
frequency: data.frequency,
|
||||
rssi: data.rssi || data.signal_strength,
|
||||
duration: data.duration || 2000,
|
||||
modulation: data.modulation
|
||||
})
|
||||
: {
|
||||
id: String(data.frequency),
|
||||
label: `${data.frequency.toFixed(3)} MHz`,
|
||||
strength: 3,
|
||||
duration: 2000,
|
||||
type: 'rf'
|
||||
};
|
||||
addTimelineEvent('listening', normalized);
|
||||
}
|
||||
}
|
||||
|
||||
function clearScannerLog() {
|
||||
@@ -700,6 +719,12 @@ function clearScannerLog() {
|
||||
scannerCycles = 0;
|
||||
recentSignalHits.clear();
|
||||
|
||||
// Clear the timeline if available
|
||||
const timeline = typeof getTimeline === 'function' ? getTimeline('listening') : null;
|
||||
if (timeline) {
|
||||
timeline.clear();
|
||||
}
|
||||
|
||||
const signalCount = document.getElementById('scannerSignalCount');
|
||||
if (signalCount) signalCount.textContent = '0';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user