Fix jwt-token

This commit is contained in:
2025-09-07 14:24:28 +02:00
parent 25701f0c9b
commit bb712ddc60

View File

@@ -422,18 +422,33 @@ const MapView = () => {
const radius = getRssiRadius(detection.rssi); const radius = getRssiRadius(detection.rssi);
console.log('MapView: Ring radius:', radius, 'for RSSI:', detection.rssi); console.log('MapView: Ring radius:', radius, 'for RSSI:', detection.rssi);
// Color based on threat level and RSSI strength // Color based on threat level and multiple drone differentiation
const getRingColor = (rssi, droneType) => { const getRingColor = (rssi, droneType, droneIndex, totalDrones) => {
// Orlan drones (type 1) always red // Orlan drones (type 1) always red
if (droneType === 1) return '#dc2626'; // red-600 if (droneType === 1) return '#dc2626'; // red-600
// Other drones based on RSSI // If multiple drones, use different colors to distinguish them
if (totalDrones > 1) {
const colors = [
'#dc2626', // red-600
'#ea580c', // orange-600
'#16a34a', // green-600
'#7c3aed', // violet-600
'#0284c7', // sky-600
'#db2777', // pink-600
'#059669', // emerald-600
'#7c2d12' // amber-800
];
return colors[droneIndex % colors.length];
}
// Single drone - color based on RSSI strength
if (rssi > -60) return '#dc2626'; // red-600 - close if (rssi > -60) return '#dc2626'; // red-600 - close
if (rssi > -70) return '#ea580c'; // orange-600 - medium if (rssi > -70) return '#ea580c'; // orange-600 - medium
return '#16a34a'; // green-600 - far return '#16a34a'; // green-600 - far
}; };
const ringColor = getRingColor(detection.rssi, detection.drone_type); const ringColor = getRingColor(detection.rssi, detection.drone_type, droneIndex, totalDrones);
// Different visual styles for multiple drones at same detector // Different visual styles for multiple drones at same detector
const getDashPattern = (droneType, droneIndex, totalDrones) => { const getDashPattern = (droneType, droneIndex, totalDrones) => {
@@ -616,10 +631,11 @@ const MapView = () => {
<span className="text-gray-700">Far Range (&lt;-70dBm)</span> <span className="text-gray-700">Far Range (&lt;-70dBm)</span>
</div> </div>
<div className="border-t border-gray-200 mt-2 pt-2"> <div className="border-t border-gray-200 mt-2 pt-2">
<div className="text-xs text-gray-600 mb-1">Multiple Drones:</div> <div className="text-xs text-gray-600 mb-1">Multiple Drones at Same Detector:</div>
<div className="text-xs text-gray-500 mb-1"> Different colors to distinguish drones</div>
<div className="text-xs text-gray-500 mb-1"> Different dash patterns</div> <div className="text-xs text-gray-500 mb-1"> Different dash patterns</div>
<div className="text-xs text-gray-500 mb-1"> Drone ID labels shown</div> <div className="text-xs text-gray-500 mb-1"> Drone ID labels shown</div>
<div className="text-xs text-gray-500 mb-1"> Slight position offsets</div> <div className="text-xs text-gray-500 mb-1"> Slight position offsets for visibility</div>
</div> </div>
<div className="text-xs text-gray-500 mt-2"> <div className="text-xs text-gray-500 mt-2">
Ring size = estimated distance from detector Ring size = estimated distance from detector