Map fixes
This commit is contained in:
@@ -31,7 +31,8 @@ const INCIDENT_COLORS: Record<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";
|
||||
return "#6b7280";
|
||||
}
|
||||
@@ -472,7 +473,7 @@ export default function MapView({ nodes, activeCalls, incidents = [], lastUpdate
|
||||
)}
|
||||
|
||||
{/* ── 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 && (
|
||||
<button
|
||||
onClick={handleFitAll}
|
||||
@@ -505,8 +506,8 @@ export default function MapView({ nodes, activeCalls, incidents = [], lastUpdate
|
||||
{/* ── Incident overlay panel ───────────────────────────────────────────── */}
|
||||
{incidents.length > 0 && (
|
||||
<>
|
||||
{/* Desktop: left sidebar — kept away from the LayersControl (topright) */}
|
||||
<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">
|
||||
{/* Desktop: left sidebar — starts below zoom controls + fit-all button */}
|
||||
<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) => {
|
||||
const color = INCIDENT_COLORS[inc.type ?? "other"] ?? INCIDENT_COLORS.other;
|
||||
const age = inc.started_at ? timeAgo(new Date(inc.started_at)) : null;
|
||||
|
||||
Reference in New Issue
Block a user