This commit is contained in:
Andras Schmelczer 2026-05-26 19:45:13 +01:00
parent c645b0f1d4
commit 39ef5c6646
79 changed files with 5660 additions and 2199 deletions

View file

@ -15,6 +15,7 @@ import type { SearchedLocation } from '../LocationSearch';
import MobileBottomSheet from '../MobileBottomSheet';
import { MapPinIcon } from '../../ui/icons/MapPinIcon';
import { EyeIcon } from '../../ui/icons/EyeIcon';
import { HouseIcon } from '../../ui/icons/HouseIcon';
import { IndeterminateProgressBar } from '../../ui/IndeterminateProgressBar';
import type { MapFlyTo } from './types';
import { MapFallback, PaneFallback } from './Fallbacks';
@ -47,6 +48,8 @@ interface MobileMapPageProps {
onCurrentLocationFound: (lat: number, lng: number) => void;
currentLocation: { lat: number; lng: number } | null;
actualListings: ActualListing[];
actualListingsEnabled: boolean;
onToggleActualListings?: () => void;
travelTimeEntries: TravelTimeEntry[];
bottomScreenInset: number;
onBottomSheetCoveredHeightChange: (height: number) => void;
@ -94,6 +97,8 @@ export function MobileMapPage({
onCurrentLocationFound,
currentLocation,
actualListings,
actualListingsEnabled,
onToggleActualListings,
travelTimeEntries,
bottomScreenInset,
onBottomSheetCoveredHeightChange,
@ -161,7 +166,19 @@ export function MobileMapPage({
</Suspense>
</div>
<div className="absolute right-3 top-3 z-20 flex flex-col gap-2">
<div className="absolute right-3 top-3 z-20 flex max-w-[calc(100%_-_1.5rem)] flex-row flex-wrap justify-end gap-2">
{onToggleActualListings && (
<button
type="button"
onClick={onToggleActualListings}
className={`rounded-lg bg-white p-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'}`}
aria-pressed={actualListingsEnabled}
aria-label={actualListingsEnabled ? 'Hide actual listings' : 'Show actual listings'}
title={actualListingsEnabled ? 'Hide actual listings' : 'Show actual listings'}
>
<HouseIcon className="h-5 w-5" />
</button>
)}
<button
onClick={onToggleOverlayPane}
className={`rounded-lg bg-white p-2 shadow-lg dark:bg-warm-800 ${overlayPaneOpen ? 'text-teal-600 dark:text-teal-400' : 'text-warm-500 hover:text-teal-600 dark:text-warm-400 dark:hover:text-teal-400'}`}