diff --git a/client/src/mobile/screens/trip/places/MPlacesBrowser.tsx b/client/src/mobile/screens/trip/places/MPlacesBrowser.tsx index 02301be56..394d46549 100644 --- a/client/src/mobile/screens/trip/places/MPlacesBrowser.tsx +++ b/client/src/mobile/screens/trip/places/MPlacesBrowser.tsx @@ -8,6 +8,7 @@ import { useTripStore } from '../../../../store/tripStore' import { useAddonStore } from '../../../../store/addonStore' import PlaceAvatar from '../../../../components/shared/PlaceAvatar' import { getCategoryIcon } from '../../../../components/shared/categoryIcons' +import { resolveTrackColor } from '../../../../components/Map/trackColors' import MConfirmSheet from '../../settings/MConfirmSheet' import type { MPlacesBrowserProps } from '../MTripShell' import type { Place } from '../../../../types' @@ -290,6 +291,15 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps) + {/* Stroke in the track's colour — the mobile map is full-bleed + with no sidebar, so this is the only thing tying a line to + a row (#776). */} + {place.route_geometry && ( + + )} {place.name} diff --git a/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx b/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx index f0053d8bf..001e63fa5 100644 --- a/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx +++ b/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx @@ -1,7 +1,7 @@ import { useMemo, useRef, useState } from 'react' import { Bookmark, Camera, ExternalLink, Loader2, Map as MapIcon, Navigation, Paperclip, - Pencil, Phone, Plus, Trash2, Upload, X, + Pencil, Phone, Plus, Route, Trash2, Upload, X, } from 'lucide-react' import MSheet from '../../../components/MSheet' import type { MTripSheetsProps } from '../MTripShell' @@ -14,6 +14,8 @@ import { useSaveToCollectionStore } from '../../../../store/saveToCollectionStor import { collectionTargetFromPlace } from '../lib/collectionTarget' import { getCategoryIcon } from '../../../../components/shared/categoryIcons' import PlaceRating from '../../../../components/shared/StarRating' +import TrackColorPicker from '../../../../components/shared/TrackColorPicker' +import { resolveTrackColor, inheritedTrackColor } from '../../../../components/Map/trackColors' import { avatarSrc } from '../../../../utils/avatarSrc' import { openFile } from '../../../../utils/fileDownload' import { getGoogleMapsUrlForPlace } from '../../../../components/Planner/placeGoogleMaps' @@ -42,6 +44,7 @@ export default function MPlaceSheet({ planner, shell }: MTripSheetsProps) { const [participantPickerOpen, setParticipantPickerOpen] = useState(false) const [uploading, setUploading] = useState(false) const [imgBusy, setImgBusy] = useState(false) + const [colorPickerOpen, setColorPickerOpen] = useState(false) const fileInputRef = useRef(null) const imageInputRef = useRef(null) @@ -132,6 +135,15 @@ export default function MPlaceSheet({ planner, shell }: MTripSheetsProps) { } } + const handleTrackColor = async (color: string | null) => { + if (!place) return + try { + await planner.tripActions.updatePlace(planner.tripId, place.id, { route_color: color }) + } catch (err: unknown) { + planner.toast.error(translateApiError(t, err, 'common.unknownError')) + } + } + const handleImageRemove = async () => { if (!place) return setImgBusy(true) @@ -290,6 +302,43 @@ export default function MPlaceSheet({ planner, shell }: MTripSheetsProps) { )} + {/* ── Track colour (#776) ── */} + {place.route_geometry && ( + <> + {t('inspector.trackColor')} +
+ + {colorPickerOpen && ( +
+ +
+ )} +
+ + )} + {/* ── Day assignments ── */} {t('mobileTrip.assignedDays')}