mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-06-09 07:43:59 +02:00
af9b3d08cc
Add Telegram OSINT with hourly incremental t.me scraping, metro geocoding separate from news centroids, threat-intercept popup UI with inline media, and HTML markers above alert boxes so pins stay clickable. Expose GFW_API_TOKEN in onboarding and Settings Maritime; harden GFW/CCTV/geo fetchers. Port Osiris- derived recon, SCM, entity graph, malware/cyber feeds, sanctions, and submarine cable layers with tests and documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
713 B
TypeScript
23 lines
713 B
TypeScript
import type { SelectedEntity } from '@/types/dashboard';
|
|
|
|
const GRAPH_TYPES = new Set(['aircraft', 'vessel', 'company', 'person', 'ip', 'country']);
|
|
|
|
const SELECTION_TO_GRAPH: Record<string, string> = {
|
|
flight: 'aircraft',
|
|
private_flight: 'aircraft',
|
|
military_flight: 'aircraft',
|
|
private_jet: 'aircraft',
|
|
tracked_flight: 'aircraft',
|
|
ship: 'vessel',
|
|
};
|
|
|
|
export function mapEntityToGraphType(type: string): string | null {
|
|
const mapped = SELECTION_TO_GRAPH[type] || type;
|
|
return GRAPH_TYPES.has(mapped) ? mapped : null;
|
|
}
|
|
|
|
export function isEntityGraphEligible(entity: SelectedEntity | null | undefined): boolean {
|
|
if (!entity) return false;
|
|
return mapEntityToGraphType(entity.type) !== null;
|
|
}
|