good
This commit is contained in:
parent
c995f12f8b
commit
8dc939d761
44 changed files with 3540 additions and 2159478 deletions
|
|
@ -19,6 +19,7 @@ import type { SearchedLocation } from '../LocationSearch';
|
|||
import { MapPinIcon } from '../../ui/icons/MapPinIcon';
|
||||
import { EyeIcon } from '../../ui/icons/EyeIcon';
|
||||
import { HouseIcon } from '../../ui/icons/HouseIcon';
|
||||
import { SpinnerIcon } from '../../ui/icons/SpinnerIcon';
|
||||
import { IndeterminateProgressBar } from '../../ui/IndeterminateProgressBar';
|
||||
import type { MapFlyTo, PaneResizeHandlers } from './types';
|
||||
import { MapFallback, PaneFallback } from './Fallbacks';
|
||||
|
|
@ -40,7 +41,9 @@ interface DesktopMapPageProps {
|
|||
mapData: MapData;
|
||||
pois: POI[];
|
||||
activeOverlays: Set<OverlayId>;
|
||||
activeCrimeTypes: Set<string>;
|
||||
basemap: BasemapId;
|
||||
colorOpacity: number;
|
||||
mapViewFeature: string | null;
|
||||
filterRange: [number, number] | null;
|
||||
viewSource: 'drag' | 'eye' | null;
|
||||
|
|
@ -60,6 +63,7 @@ interface DesktopMapPageProps {
|
|||
currentLocation: { lat: number; lng: number } | null;
|
||||
actualListings: ActualListing[];
|
||||
actualListingsEnabled: boolean;
|
||||
actualListingsLoading: boolean;
|
||||
onToggleActualListings?: () => void;
|
||||
travelTimeEntries: TravelTimeEntry[];
|
||||
densityLabel: string;
|
||||
|
|
@ -93,7 +97,9 @@ export function DesktopMapPage({
|
|||
mapData,
|
||||
pois,
|
||||
activeOverlays,
|
||||
activeCrimeTypes,
|
||||
basemap,
|
||||
colorOpacity,
|
||||
mapViewFeature,
|
||||
filterRange,
|
||||
viewSource,
|
||||
|
|
@ -113,6 +119,7 @@ export function DesktopMapPage({
|
|||
currentLocation,
|
||||
actualListings,
|
||||
actualListingsEnabled,
|
||||
actualListingsLoading,
|
||||
onToggleActualListings,
|
||||
travelTimeEntries,
|
||||
densityLabel,
|
||||
|
|
@ -187,7 +194,9 @@ export function DesktopMapPage({
|
|||
usePostcodeView={mapData.usePostcodeView}
|
||||
pois={pois}
|
||||
activeOverlays={activeOverlays}
|
||||
activeCrimeTypes={activeCrimeTypes}
|
||||
basemap={basemap}
|
||||
colorOpacity={colorOpacity}
|
||||
onViewChange={mapData.handleViewChange}
|
||||
viewFeature={mapViewFeature}
|
||||
colorRange={mapData.colorRange}
|
||||
|
|
@ -223,11 +232,16 @@ export function DesktopMapPage({
|
|||
type="button"
|
||||
onClick={onToggleActualListings}
|
||||
aria-pressed={actualListingsEnabled}
|
||||
aria-busy={actualListingsLoading}
|
||||
aria-label={actualListingsEnabled ? 'Hide actual listings' : 'Show actual listings'}
|
||||
title={actualListingsEnabled ? 'Hide actual listings' : 'Show actual listings'}
|
||||
className={`flex items-center gap-2 rounded-lg bg-white px-3 py-2 shadow-lg dark:bg-warm-800 ${actualListingsEnabled ? 'text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300' : 'text-warm-500 hover:text-red-600 dark:text-warm-400 dark:hover:text-red-400'}`}
|
||||
>
|
||||
<HouseIcon className="h-5 w-5" />
|
||||
{actualListingsLoading ? (
|
||||
<SpinnerIcon className="h-5 w-5 animate-spin" />
|
||||
) : (
|
||||
<HouseIcon className="h-5 w-5" />
|
||||
)}
|
||||
<span className="text-sm font-medium">
|
||||
Listings{actualListingsEnabled ? ` (${actualListings.length})` : ''}
|
||||
</span>
|
||||
|
|
@ -250,7 +264,7 @@ export function DesktopMapPage({
|
|||
</button>
|
||||
</div>
|
||||
{overlayPaneOpen && (
|
||||
<div className="absolute bottom-28 right-4 z-10 flex h-[260px] min-h-0 w-80 flex-col overflow-hidden rounded-lg border border-warm-200 bg-white shadow-xl dark:border-warm-700 dark:bg-warm-900">
|
||||
<div className="absolute bottom-16 right-4 z-10 flex max-h-[60vh] min-h-0 w-80 flex-col overflow-hidden rounded-lg border border-warm-200 bg-white shadow-xl dark:border-warm-700 dark:bg-warm-900">
|
||||
{overlayPane}
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue