Map fixes

This commit is contained in:
Logan
2026-05-25 15:28:35 -04:00
parent 7d6e97fd4a
commit 34ca1d0baf
+5 -4
View File
@@ -31,7 +31,8 @@ const INCIDENT_COLORS: Record<string, string> = {
}; };
function statusColor(status: string): string { function statusColor(status: string): string {
if (status === "online" || status === "recording") return "#4ade80"; if (status === "online") return "#4ade80";
if (status === "recording") return "#fb923c";
if (status === "unconfigured") return "#818cf8"; if (status === "unconfigured") return "#818cf8";
return "#6b7280"; return "#6b7280";
} }
@@ -472,7 +473,7 @@ export default function MapView({ nodes, activeCalls, incidents = [], lastUpdate
)} )}
{/* ── Map action buttons — top-left, below zoom controls ──────────────── */} {/* ── Map action buttons — top-left, below zoom controls ──────────────── */}
<div className="absolute top-[4.5rem] left-3 z-[1001] flex flex-col gap-1"> <div className="absolute top-[4.5rem] left-3 z-[1002] flex flex-col gap-1">
{mapInstance && allPositions.length > 0 && ( {mapInstance && allPositions.length > 0 && (
<button <button
onClick={handleFitAll} onClick={handleFitAll}
@@ -505,8 +506,8 @@ export default function MapView({ nodes, activeCalls, incidents = [], lastUpdate
{/* ── Incident overlay panel ───────────────────────────────────────────── */} {/* ── Incident overlay panel ───────────────────────────────────────────── */}
{incidents.length > 0 && ( {incidents.length > 0 && (
<> <>
{/* Desktop: left sidebar — kept away from the LayersControl (topright) */} {/* Desktop: left sidebar — starts below zoom controls + fit-all button */}
<div className="absolute top-3 left-3 bottom-[4.5rem] z-[1001] hidden md:flex flex-col w-56 gap-1.5 overflow-y-auto"> <div className="absolute top-[8rem] left-3 bottom-[4.5rem] z-[1001] hidden md:flex flex-col w-56 gap-1.5 overflow-y-auto">
{incidents.map((inc) => { {incidents.map((inc) => {
const color = INCIDENT_COLORS[inc.type ?? "other"] ?? INCIDENT_COLORS.other; const color = INCIDENT_COLORS[inc.type ?? "other"] ?? INCIDENT_COLORS.other;
const age = inc.started_at ? timeAgo(new Date(inc.started_at)) : null; const age = inc.started_at ? timeAgo(new Date(inc.started_at)) : null;