feat(SystemStatistics): add system jumps and kills statistics with toggle functionality
This commit is contained in:
@@ -16,6 +16,10 @@ interface MapNodeProps {
|
||||
signatures?: number;
|
||||
isDraggable?: boolean;
|
||||
disableNavigate?: boolean;
|
||||
jumps?: number;
|
||||
kills?: number;
|
||||
showJumps?: boolean;
|
||||
showKills?: boolean;
|
||||
}
|
||||
|
||||
export const MapNode: React.FC<MapNodeProps> = ({
|
||||
@@ -33,6 +37,10 @@ export const MapNode: React.FC<MapNodeProps> = ({
|
||||
signatures,
|
||||
isDraggable = false,
|
||||
disableNavigate = false,
|
||||
jumps,
|
||||
kills,
|
||||
showJumps = false,
|
||||
showKills = false,
|
||||
}) => {
|
||||
const [isHovered, setIsHovered] = useState(false);
|
||||
const [isDragging, setIsDragging] = useState(false);
|
||||
@@ -204,6 +212,35 @@ export const MapNode: React.FC<MapNodeProps> = ({
|
||||
>
|
||||
{signatures !== undefined && signatures > 0 && `📡 ${signatures}`}
|
||||
</text>
|
||||
|
||||
{/* Statistics display */}
|
||||
{showJumps && jumps !== undefined && (
|
||||
<text
|
||||
x="0"
|
||||
y={textOffset + 30}
|
||||
textAnchor="middle"
|
||||
fill="#60a5fa"
|
||||
fontSize="10"
|
||||
className="pointer-events-none select-none"
|
||||
style={{ textShadow: '1px 1px 2px rgba(0,0,0,0.8)' }}
|
||||
>
|
||||
🚀 {jumps}
|
||||
</text>
|
||||
)}
|
||||
|
||||
{showKills && kills !== undefined && (
|
||||
<text
|
||||
x="0"
|
||||
y={textOffset + 45}
|
||||
textAnchor="middle"
|
||||
fill="#f87171"
|
||||
fontSize="10"
|
||||
className="pointer-events-none select-none"
|
||||
style={{ textShadow: '1px 1px 2px rgba(0,0,0,0.8)' }}
|
||||
>
|
||||
⚔️ {kills}
|
||||
</text>
|
||||
)}
|
||||
</g>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user