From ac723744abd24884745dace66632d787f23db108 Mon Sep 17 00:00:00 2001 From: Maurice <61554723+mauriceboe@users.noreply.github.com> Date: Tue, 21 Jul 2026 22:10:41 +0200 Subject: [PATCH] =?UTF-8?q?feat(collections):=20add=20places=20by=20coordi?= =?UTF-8?q?nates=20+=20sort=20A=E2=80=93Z=20(#1647)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(collections): add places by coordinates and sort the list Raised in #1640: collections behaved differently from trips — you couldn't add a place by typing coordinates, and the list had no order control. The add-place modal and the place detail sheet now take an editable address plus latitude/longitude, with a "lat, lng" paste shortcut, so a place can be saved by GPS without searching. The place update path learned to persist coordinates, so an existing one can be corrected later. A sort control in the filter row toggles between the saved order and alphabetical by name. The add-place button moved into that row to match the other controls, and the add-label button dropped its dashed one-off styling. New strings land across all 23 locales. * feat(collections): make the add-place button icon-only Keep the filter row compact — the button carries just the plus icon (with an aria-label/title), squared off to match the dropdown height. --- .../Collections/AddPlaceToCollectionModal.tsx | 44 ++++++++++++++++--- .../Collections/CollectionFilterBar.test.tsx | 4 ++ .../Collections/CollectionFilterBar.tsx | 27 ++++++++++-- .../Collections/CollectionPlaceDetail.tsx | 26 +++++++++-- client/src/pages/CollectionsPage.test.tsx | 22 +++++++--- client/src/pages/CollectionsPage.tsx | 22 +++++++--- .../src/pages/collections/collectionsModel.ts | 10 +++-- .../src/pages/collections/useCollections.ts | 12 ++--- client/src/store/collectionStore.ts | 6 +++ client/src/styles/collections.css | 3 +- server/src/services/collectionsService.ts | 2 + shared/src/collection/collection.schema.ts | 3 ++ shared/src/i18n/ar/collection.ts | 3 ++ shared/src/i18n/br/collection.ts | 3 ++ shared/src/i18n/ca/collection.ts | 3 ++ shared/src/i18n/cs/collection.ts | 3 ++ shared/src/i18n/de/collection.ts | 3 ++ shared/src/i18n/en/collection.ts | 3 ++ shared/src/i18n/es/collection.ts | 3 ++ shared/src/i18n/fr/collection.ts | 3 ++ shared/src/i18n/gr/collection.ts | 3 ++ shared/src/i18n/hu/collection.ts | 3 ++ shared/src/i18n/id/collection.ts | 3 ++ shared/src/i18n/it/collection.ts | 3 ++ shared/src/i18n/ja/collection.ts | 3 ++ shared/src/i18n/ko/collection.ts | 3 ++ shared/src/i18n/nl/collection.ts | 3 ++ shared/src/i18n/pl/collection.ts | 3 ++ shared/src/i18n/ru/collection.ts | 3 ++ shared/src/i18n/sv/collection.ts | 3 ++ shared/src/i18n/tr/collection.ts | 3 ++ shared/src/i18n/uk/collection.ts | 3 ++ shared/src/i18n/vi/collection.ts | 3 ++ shared/src/i18n/zh-TW/collection.ts | 3 ++ shared/src/i18n/zh/collection.ts | 3 ++ 35 files changed, 212 insertions(+), 38 deletions(-) diff --git a/client/src/components/Collections/AddPlaceToCollectionModal.tsx b/client/src/components/Collections/AddPlaceToCollectionModal.tsx index ac4adc388..671e5c01e 100644 --- a/client/src/components/Collections/AddPlaceToCollectionModal.tsx +++ b/client/src/components/Collections/AddPlaceToCollectionModal.tsx @@ -4,6 +4,7 @@ import remarkGfm from 'remark-gfm' import remarkBreaks from 'remark-breaks' import { Search, MapPin, Plus, Loader2, Link2, Trash2, Check, X } from 'lucide-react' import Modal from '../shared/Modal' +import { NumericInput } from '../shared/NumericInput' import MarkdownToolbar from '../Journey/MarkdownToolbar' import { mapsApi } from '../../api/client' import { collectionsApi } from '../../api/collections' @@ -44,6 +45,11 @@ export default function AddPlaceToCollectionModal({ isOpen, collectionId, collec // The picked location (address/coords/ids) plus the editable fields. const [picked, setPicked] = useState(null) const [name, setName] = useState('') + // Address + coordinates: prefilled from a picked result, but also directly + // typeable so a place can be added by GPS without searching (#1435). + const [address, setAddress] = useState('') + const [lat, setLat] = useState('') + const [lng, setLng] = useState('') const [categoryId, setCategoryId] = useState(null) const [description, setDescription] = useState('') const [links, setLinks] = useState([]) @@ -51,7 +57,7 @@ export default function AddPlaceToCollectionModal({ isOpen, collectionId, collec const [saving, setSaving] = useState(false) const descRef = useRef(null) - const reset = () => { setQuery(''); setResults([]); setPicked(null); setName(''); setCategoryId(null); setDescription(''); setLinks([]); setStatus('idea') } + const reset = () => { setQuery(''); setResults([]); setPicked(null); setName(''); setAddress(''); setLat(''); setLng(''); setCategoryId(null); setDescription(''); setLinks([]); setStatus('idea') } useEffect(() => { if (!isOpen) reset() }, [isOpen]) const search = async () => { @@ -67,21 +73,31 @@ export default function AddPlaceToCollectionModal({ isOpen, collectionId, collec } } - const pick = (r: MapsPlace) => { setPicked(r); setName(str(r.name) ?? ''); setResults([]); setQuery(str(r.name) ?? query) } + const pick = (r: MapsPlace) => { + setPicked(r) + setName(str(r.name) ?? '') + setAddress(str(r.address) ?? '') + const la = num(r.lat); const lo = num(r.lng) + setLat(la != null ? String(la) : '') + setLng(lo != null ? String(lo) : '') + setResults([]); setQuery(str(r.name) ?? query) + } const setLink = (i: number, patch: Partial) => setLinks(links.map((l, idx) => (idx === i ? { ...l, ...patch } : l))) const save = async () => { const cleanName = name.trim() if (!cleanName) return const cleanLinks = links.map(l => ({ label: l.label?.trim() || undefined, url: normalizeLinkUrl(l.url) })).filter(l => l.url) + const latNum = lat.trim() ? Number(lat) : NaN + const lngNum = lng.trim() ? Number(lng) : NaN setSaving(true) try { const res = await collectionsApi.savePlace({ collection_id: collectionId, name: cleanName, - address: (picked && str(picked.address)) ?? null, - lat: (picked && num(picked.lat)) ?? null, - lng: (picked && num(picked.lng)) ?? null, + address: address.trim() || null, + lat: Number.isFinite(latNum) ? latNum : null, + lng: Number.isFinite(lngNum) ? lngNum : null, google_place_id: (picked && str(picked.google_place_id)) ?? null, google_ftid: (picked && str(picked.google_ftid)) ?? null, osm_id: (picked && str(picked.osm_id)) ?? null, @@ -103,7 +119,12 @@ export default function AddPlaceToCollectionModal({ isOpen, collectionId, collec } } - const address = picked ? str(picked.address) : undefined + const coordPaste = (e: React.ClipboardEvent) => { + const text = e.clipboardData.getData('text').trim() + const match = text.match(/^(-?\d+\.?\d*)\s*[,;\s]\s*(-?\d+\.?\d*)$/) + if (match) { e.preventDefault(); setLat(match[1]); setLng(match[2]) } + } + const coordInputClass = 'w-full px-3 py-2 rounded-lg border border-edge bg-surface-input text-content text-[14px] outline-none focus:border-accent' return ( setName(e.target.value)} placeholder={t('common.name')} className="w-full px-3 py-2 rounded-lg border border-edge bg-surface-input text-content text-[14px] outline-none focus:border-accent" /> - {address &&
{address}
} + + + {/* Address + coordinates — editable so a place can be added by GPS alone */} +
+ + setAddress(e.target.value)} placeholder={t('places.formAddressPlaceholder')} className={coordInputClass} /> +
+ + +
{/* Status */} diff --git a/client/src/components/Collections/CollectionFilterBar.test.tsx b/client/src/components/Collections/CollectionFilterBar.test.tsx index 7d6e99b99..da13a5a21 100644 --- a/client/src/components/Collections/CollectionFilterBar.test.tsx +++ b/client/src/components/Collections/CollectionFilterBar.test.tsx @@ -28,9 +28,13 @@ function makeProps(overrides: Partial = {}): HarnessProps { categoryFilter: 'all', categoryOptions: CATEGORY_OPTIONS, ratingFilter: 'all', + sortMode: 'default', onStatusFilter: vi.fn(), onCategoryFilter: vi.fn(), onRatingFilter: vi.fn(), + onSortMode: vi.fn(), + canAddPlace: false, + onAddPlace: vi.fn(), showLabels: false, labelOptions: [], labelFilter: [], diff --git a/client/src/components/Collections/CollectionFilterBar.tsx b/client/src/components/Collections/CollectionFilterBar.tsx index 43ce00b89..2dec032b7 100644 --- a/client/src/components/Collections/CollectionFilterBar.tsx +++ b/client/src/components/Collections/CollectionFilterBar.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from 'react' -import { ChevronDown, Check, Layers, Tag, Tags, CheckSquare, Star } from 'lucide-react' -import type { StatusFilter } from '../../store/collectionStore' +import { ChevronDown, Check, Layers, Tag, Tags, CheckSquare, Star, Plus, ArrowDownUp } from 'lucide-react' +import type { StatusFilter, CollectionSortMode } from '../../store/collectionStore' import type { TranslationFn } from '../../types' import { getCategoryIcon } from '../shared/categoryIcons' import { STATUS_META, STATUS_ORDER } from '../../pages/collections/collectionsModel' @@ -68,9 +68,14 @@ interface CollectionFilterBarProps { categoryFilter: number | 'all' categoryOptions: CategoryOption[] ratingFilter: number | 'all' + sortMode: CollectionSortMode onStatusFilter: (f: StatusFilter) => void onCategoryFilter: (f: number | 'all') => void onRatingFilter: (f: number | 'all') => void + onSortMode: (m: CollectionSortMode) => void + // Add a place to the current list — leads the row when the list is editable. + canAddPlace: boolean + onAddPlace: () => void // Per-collection labels (hidden on the "All saved" union). showLabels: boolean labelOptions: LabelOption[] @@ -90,7 +95,9 @@ interface CollectionFilterBarProps { * Custom compact dropdowns so they barely take any space. */ export default function CollectionFilterBar({ - statusFilter, counts, categoryFilter, categoryOptions, ratingFilter, onStatusFilter, onCategoryFilter, onRatingFilter, + statusFilter, counts, categoryFilter, categoryOptions, ratingFilter, sortMode, + onStatusFilter, onCategoryFilter, onRatingFilter, onSortMode, + canAddPlace, onAddPlace, showLabels, labelOptions, labelFilter, onLabelFilter, canManageLabels, onManageLabels, showSelect, selectMode, onToggleSelect, t, }: CollectionFilterBarProps): React.ReactElement { @@ -121,13 +128,25 @@ export default function CollectionFilterBar({ })), ] + // Display order: the saved order, or alphabetical by name. + const sortOpts: Opt[] = [ + { key: 'default', label: t('collections.sort.default') }, + { key: 'name_asc', label: t('collections.sort.nameAsc') }, + ] + return (
+ {canAddPlace && ( + + )} onStatusFilter(k as StatusFilter)} lead={} /> {categoryOptions.length > 0 && ( onCategoryFilter(k as number | 'all')} lead={} /> )} onRatingFilter(k as number | 'all')} lead={} /> + onSortMode(k as CollectionSortMode)} lead={} /> {showSelect && ( diff --git a/client/src/components/Collections/CollectionPlaceDetail.tsx b/client/src/components/Collections/CollectionPlaceDetail.tsx index 44ffa9cca..0d8e3612f 100644 --- a/client/src/components/Collections/CollectionPlaceDetail.tsx +++ b/client/src/components/Collections/CollectionPlaceDetail.tsx @@ -6,6 +6,7 @@ import { X, Pencil, Copy, Trash2, MapPin, Link2, Plus, ExternalLink, Check, Tag, import type { CollectionPlace, CollectionStatus, CollectionLink, CollectionLabel } from '@trek/shared' import type { Category, TranslationFn } from '../../types' import MarkdownToolbar from '../Journey/MarkdownToolbar' +import { NumericInput } from '../shared/NumericInput' import { mapsApi } from '../../api/client' import { entityGradient } from '../../utils/gradients' import { getCategoryIcon } from '../shared/categoryIcons' @@ -31,7 +32,7 @@ interface CollectionPlaceDetailProps { anchorRect?: { left: number; width: number } | null onClose: () => void onSetStatus: (status: CollectionStatus) => void - onSave: (patch: { name?: string; description?: string | null; links?: CollectionLink[]; category_id?: number | null; label_ids?: number[]; image_url?: string | null }) => Promise + onSave: (patch: { name?: string; description?: string | null; links?: CollectionLink[]; category_id?: number | null; label_ids?: number[]; image_url?: string | null; lat?: number | null; lng?: number | null }) => Promise /** Upload a custom cover image (#1136); enables the cover change/remove controls. */ onUploadImage?: (file: File) => Promise onCopyToTrip: () => void @@ -76,6 +77,8 @@ export default function CollectionPlaceDetail({ const [description, setDescription] = useState(place.description ?? '') const [links, setLinks] = useState(place.links ?? []) const [labelIds, setLabelIds] = useState(place.label_ids ?? []) + const [lat, setLat] = useState(place.lat != null ? String(place.lat) : '') + const [lng, setLng] = useState(place.lng != null ? String(place.lng) : '') const [saving, setSaving] = useState(false) // A higher-res photo pulled from the maps provider when the place has none of // its own — the list avatar's little thumbnail is too low-res for the cover. @@ -90,6 +93,8 @@ export default function CollectionPlaceDetail({ setDescription(place.description ?? '') setLinks(place.links ?? []) setLabelIds(place.label_ids ?? []) + setLat(place.lat != null ? String(place.lat) : '') + setLng(place.lng != null ? String(place.lng) : '') // eslint-disable-next-line react-hooks/exhaustive-deps }, [place.id]) @@ -136,14 +141,21 @@ export default function CollectionPlaceDetail({ const setLink = (i: number, patch: Partial) => setLinks(links.map((l, idx) => (idx === i ? { ...l, ...patch } : l))) const toggleLabel = (id: number) => setLabelIds(labelIds.includes(id) ? labelIds.filter(x => x !== id) : [...labelIds, id]) - const resetForm = () => { setEditing(false); setName(place.name); setCategoryId(place.category_id ?? null); setDescription(place.description ?? ''); setLinks(place.links ?? []); setLabelIds(place.label_ids ?? []) } + const resetForm = () => { setEditing(false); setName(place.name); setCategoryId(place.category_id ?? null); setDescription(place.description ?? ''); setLinks(place.links ?? []); setLabelIds(place.label_ids ?? []); setLat(place.lat != null ? String(place.lat) : ''); setLng(place.lng != null ? String(place.lng) : '') } + const coordPaste = (e: React.ClipboardEvent) => { + const text = e.clipboardData.getData('text').trim() + const match = text.match(/^(-?\d+\.?\d*)\s*[,;\s]\s*(-?\d+\.?\d*)$/) + if (match) { e.preventDefault(); setLat(match[1]); setLng(match[2]) } + } const assignedLabels = labels.filter(l => (place.label_ids ?? []).includes(l.id)) const save = async () => { const cleanLinks = links.map(l => ({ label: l.label?.trim() || undefined, url: normalizeLinkUrl(l.url) })).filter(l => l.url) + const latNum = lat.trim() ? Number(lat) : NaN + const lngNum = lng.trim() ? Number(lng) : NaN setSaving(true) try { - await onSave({ name: name.trim() || place.name, description: description.trim() || null, links: cleanLinks, category_id: categoryId, label_ids: labelIds }) + await onSave({ name: name.trim() || place.name, description: description.trim() || null, links: cleanLinks, category_id: categoryId, label_ids: labelIds, lat: Number.isFinite(latNum) ? latNum : null, lng: Number.isFinite(lngNum) ? lngNum : null }) setEditing(false) } catch (err) { toast.error(getApiErrorMessage(err, t('common.error'))) @@ -236,6 +248,14 @@ export default function CollectionPlaceDetail({ })}
+ {/* Coordinates */} +
+
{t('collections.coordinates')}
+
+ + +
+
{/* Labels */} {labels.length > 0 && (
diff --git a/client/src/pages/CollectionsPage.test.tsx b/client/src/pages/CollectionsPage.test.tsx index dced7a40a..c67620953 100644 --- a/client/src/pages/CollectionsPage.test.tsx +++ b/client/src/pages/CollectionsPage.test.tsx @@ -1,6 +1,7 @@ // Regression coverage for issue #1485 — the "Add place" button vanished once a -// collection held its first mappable place on a wide/desktop layout, because the -// whole toolbar (which hosts the button) was gated on `!mapOverlay`. These tests +// collection held its first mappable place on a wide/desktop layout. The button +// now lives inside the filter row (delegated via `canAddPlace`) for a populated +// list, and as an empty-state CTA when the list has no places yet. These tests // render the page against a mocked useCollections hook (per the Page pattern) and // assert the Add affordance stays reachable — and that there is exactly one of it. import { describe, it, expect, vi } from 'vitest' @@ -16,7 +17,14 @@ vi.mock('../components/Collections/ListsRail', () => ({ default: () =>
} vi.mock('../components/Collections/ListEditorModal', () => ({ default: () => null })) vi.mock('../components/Collections/CollectionHero', () => ({ default: () =>
})) vi.mock('../components/Collections/CollectionList', () => ({ default: () =>
})) -vi.mock('../components/Collections/CollectionFilterBar', () => ({ default: () =>
})) +// The filter row hosts the Add button for a populated list; mirror that contract +// so the page-level "reachable + exactly one" assertion still holds end to end. +vi.mock('../components/Collections/CollectionFilterBar', () => ({ + default: (props: { canAddPlace?: boolean; onAddPlace?: () => void }) => + props.canAddPlace + ? + :
, +})) vi.mock('../components/Collections/CollectionMapPanel', () => ({ default: () =>
})) vi.mock('../components/Collections/CopyToTripModal', () => ({ default: () => null })) vi.mock('../components/Collections/MoveToListModal', () => ({ default: () => null })) @@ -104,20 +112,20 @@ describe('CollectionsPage — Add place button reachability (#1485)', () => { // The exact bug: wide layout + one place with coordinates + editable list. mockUseCollections.mockReturnValue(makeHook()) render() - const addButtons = screen.getAllByLabelText('collections.addPlace') - // Present, and exactly one — no duplicate map-overlay "+" alongside it. + const addButtons = screen.getAllByRole('button', { name: 'collections.addPlace' }) + // Present, and exactly one — no duplicate affordance alongside it. expect(addButtons).toHaveLength(1) }) it('does not show the Add button for a viewer who cannot edit', () => { mockUseCollections.mockReturnValue(makeHook({ canEdit: false, isOwner: false, myRole: 'viewer' })) render() - expect(screen.queryByLabelText('collections.addPlace')).toBeNull() + expect(screen.queryByRole('button', { name: 'collections.addPlace' })).toBeNull() }) it('shows the Add button on an empty collection', () => { mockUseCollections.mockReturnValue(makeHook({ places: [], visiblePlaces: [], mappable: [] })) render() - expect(screen.getAllByLabelText('collections.addPlace')).toHaveLength(1) + expect(screen.getAllByRole('button', { name: 'collections.addPlace' })).toHaveLength(1) }) }) diff --git a/client/src/pages/CollectionsPage.tsx b/client/src/pages/CollectionsPage.tsx index cde250c5e..4ad98fbc1 100644 --- a/client/src/pages/CollectionsPage.tsx +++ b/client/src/pages/CollectionsPage.tsx @@ -103,9 +103,13 @@ function CollectionsPageDesktop(): React.ReactElement { categoryFilter={c.categoryFilter} categoryOptions={c.categoryOptions} ratingFilter={c.ratingFilter} + sortMode={c.sortMode} onStatusFilter={c.setStatusFilter} onCategoryFilter={c.setCategoryFilter} onRatingFilter={c.setRatingFilter} + onSortMode={c.setSortMode} + canAddPlace={canAddPlace} + onAddPlace={() => c.setShowAddPlace(true)} showLabels={isRealList} labelOptions={c.labelOptions} labelFilter={c.labelFilter} @@ -131,7 +135,16 @@ function CollectionsPageDesktop(): React.ReactElement { if (c.placesLoading && !hasPlaces) { body =
} else if (!hasPlaces) { - body = + body = ( +
+ + {canAddPlace && ( + + )} +
+ ) } else if (desktopSplit) { body = (
@@ -195,7 +208,7 @@ function CollectionsPageDesktop(): React.ReactElement { />
- {(!mapOverlay || canAddPlace) && ( + {!mapOverlay && (
)} - {canAddPlace && ( - - )}
{!mapOverlay && (
diff --git a/client/src/pages/collections/collectionsModel.ts b/client/src/pages/collections/collectionsModel.ts index 894bc5ec6..9b1c511f3 100644 --- a/client/src/pages/collections/collectionsModel.ts +++ b/client/src/pages/collections/collectionsModel.ts @@ -2,7 +2,7 @@ import { Circle, Bookmark, CheckCircle2 } from 'lucide-react' import type { LucideIcon } from 'lucide-react' import type { CollectionPlace, CollectionStatus, CollectionLabel } from '@trek/shared' import { COLLECTION_STATUSES } from '@trek/shared' -import type { StatusFilter } from '../../store/collectionStore' +import type { StatusFilter, CollectionSortMode } from '../../store/collectionStore' /** * Pure data shaping + presentation metadata for the Collections page. No React @@ -35,8 +35,12 @@ export function nextStatus(status: CollectionStatus): CollectionStatus { return STATUS_ORDER[(i + 1) % STATUS_ORDER.length] } -/** Sort places by explicit sort_order, falling back to created_at (newest first). */ -export function sortPlaces(places: CollectionPlace[]): CollectionPlace[] { +/** Order the places for display. 'default' keeps the saved order (sort_order, + * then newest first); 'name_asc' sorts alphabetically by name (locale-aware). */ +export function sortPlaces(places: CollectionPlace[], mode: CollectionSortMode = 'default'): CollectionPlace[] { + if (mode === 'name_asc') { + return [...places].sort((a, b) => a.name.localeCompare(b.name)) + } return [...places].sort((a, b) => { const so = (a.sort_order ?? 0) - (b.sort_order ?? 0) if (so !== 0) return so diff --git a/client/src/pages/collections/useCollections.ts b/client/src/pages/collections/useCollections.ts index 8b167b000..4b7f800c5 100644 --- a/client/src/pages/collections/useCollections.ts +++ b/client/src/pages/collections/useCollections.ts @@ -50,7 +50,7 @@ export function useCollections() { const store = useCollectionStore() const { collections, activeId, places, members, labels, incomingInvites, - view, statusFilter, categoryFilter, ratingFilter, labelFilter, search, selectedPlaceId, selectMode, selectedIds, + view, statusFilter, categoryFilter, ratingFilter, labelFilter, sortMode, search, selectedPlaceId, selectMode, selectedIds, loading, placesLoading, loadAll, setActive, refreshActive, loadCollection, deleteCollection, @@ -58,7 +58,7 @@ export function useCollections() { moveToList, duplicateToList, setSelectedIds, createLabel, updateLabel, deleteLabel, assignLabels, acceptInvite, declineInvite, - setView, setStatusFilter, setCategoryFilter, setRatingFilter, setLabelFilter, setSearch, setSelectedPlaceId, setSelectMode, toggleSelect, + setView, setStatusFilter, setCategoryFilter, setRatingFilter, setLabelFilter, setSortMode, setSearch, setSelectedPlaceId, setSelectMode, toggleSelect, } = store // ── Page-local UI state ───────────────────────────────────────────── @@ -167,8 +167,8 @@ export function useCollections() { // Labels are per-collection, so never apply them on the "All saved" union. const visiblePlaces = useMemo( - () => sortPlaces(filterPlaces(places, statusFilter, search, categoryFilter, isAllSaved ? [] : labelFilter, ratingFilter)), - [places, statusFilter, search, categoryFilter, isAllSaved, labelFilter, ratingFilter], + () => sortPlaces(filterPlaces(places, statusFilter, search, categoryFilter, isAllSaved ? [] : labelFilter, ratingFilter), sortMode), + [places, statusFilter, search, categoryFilter, isAllSaved, labelFilter, ratingFilter, sortMode], ) // Categories actually present in this list, for the category filter dropdown. const categoryOptions = useMemo(() => presentCategories(places), [places]) @@ -386,11 +386,11 @@ export function useCollections() { myRole, canEdit, canDelete, canShare, shareMemberCount, activeId, places, visiblePlaces, mappable, members, incomingInvites, counts, - view, statusFilter, categoryFilter, categoryOptions, ratingFilter, search, selectedPlaceId, selectMode, selectedIds, + view, statusFilter, categoryFilter, categoryOptions, ratingFilter, sortMode, search, selectedPlaceId, selectMode, selectedIds, labels, labelFilter, labelOptions, loading, placesLoading, // store setters - setView, setStatusFilter, setCategoryFilter, setRatingFilter, setLabelFilter, setSearch, setSelectedPlaceId, setSelectMode, toggleSelect, + setView, setStatusFilter, setCategoryFilter, setRatingFilter, setLabelFilter, setSortMode, setSearch, setSelectedPlaceId, setSelectMode, toggleSelect, updatePlace, uploadPlaceImage, // labels showLabelManager, setShowLabelManager, labelPickerOpen, setLabelPickerOpen, diff --git a/client/src/store/collectionStore.ts b/client/src/store/collectionStore.ts index 7d52876d9..187c29641 100644 --- a/client/src/store/collectionStore.ts +++ b/client/src/store/collectionStore.ts @@ -23,6 +23,8 @@ export type ActiveCollectionId = number | typeof ALL_SAVED | null export type CollectionView = 'list' | 'map' export type StatusFilter = CollectionStatus | 'all' +/** Display order for a list's places: the saved order, or alphabetical by name. */ +export type CollectionSortMode = 'default' | 'name_asc' interface CollectionState { collections: Collection[] @@ -36,6 +38,7 @@ interface CollectionState { categoryFilter: number | 'all' ratingFilter: number | 'all' labelFilter: number[] + sortMode: CollectionSortMode search: string selectedPlaceId: number | null selectMode: boolean @@ -82,6 +85,7 @@ interface CollectionState { setCategoryFilter: (filter: number | 'all') => void setRatingFilter: (filter: number | 'all') => void setLabelFilter: (labelIds: number[]) => void + setSortMode: (mode: CollectionSortMode) => void setSearch: (search: string) => void setSelectedPlaceId: (id: number | null) => void setSelectMode: (on: boolean) => void @@ -102,6 +106,7 @@ export const useCollectionStore = create((set, get) => ({ categoryFilter: 'all', ratingFilter: 'all', labelFilter: [], + sortMode: 'default', search: '', selectedPlaceId: null, selectMode: false, @@ -394,6 +399,7 @@ export const useCollectionStore = create((set, get) => ({ setCategoryFilter: (filter: number | 'all') => set({ categoryFilter: filter }), setRatingFilter: (filter: number | 'all') => set({ ratingFilter: filter }), setLabelFilter: (labelIds: number[]) => set({ labelFilter: labelIds }), + setSortMode: (mode: CollectionSortMode) => set({ sortMode: mode }), setSearch: (search: string) => set({ search }), setSelectedPlaceId: (id: number | null) => set({ selectedPlaceId: id }), setSelectMode: (on: boolean) => set({ selectMode: on, selectedIds: on ? get().selectedIds : [] }), diff --git a/client/src/styles/collections.css b/client/src/styles/collections.css index e85d0cb62..dc26384ce 100644 --- a/client/src/styles/collections.css +++ b/client/src/styles/collections.css @@ -281,12 +281,13 @@ .trek-dash .col-labelchip.on { color: var(--label, var(--accent)); background: color-mix(in oklch, var(--label, var(--accent)) 16%, transparent); border-color: color-mix(in oklch, var(--label, var(--accent)) 42%, transparent); } .trek-dash .col-labelchip.on .col-labelchip-dot { background: var(--label, var(--accent)); } .trek-dash .col-labelchip.static { cursor: default; color: var(--label, var(--accent)); background: color-mix(in oklch, var(--label, var(--accent)) 14%, transparent); border-color: transparent; } -.trek-dash .col-labelchip-manage { color: var(--ink-3); border-style: dashed; } .trek-dash .col-detail-labels { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 10px; } /* ----------------- filter bar (status + category dropdowns) ----------------- */ .trek-dash .col-filterbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; } .trek-dash .col-filter { position: relative; } +/* Icon-only add-place button: square it off so it matches the dropdowns' height. */ +.trek-dash .col-filter-add { padding: 7px; } .trek-dash .col-filter-select { margin-left: auto; } .trek-dash .col-filter-select.open { background: var(--accent); border-color: var(--accent); color: var(--accent-text); } .trek-dash .col-filter-select.open:hover { background: var(--accent); color: var(--accent-text); } diff --git a/server/src/services/collectionsService.ts b/server/src/services/collectionsService.ts index 14b1613a3..3eab85a24 100644 --- a/server/src/services/collectionsService.ts +++ b/server/src/services/collectionsService.ts @@ -598,6 +598,8 @@ export function updatePlace(userId: number, placeId: number, body: import('@trek if (body.name !== undefined) { updates.push('name = ?'); params.push(body.name); } if (body.description !== undefined) { updates.push('description = ?'); params.push(body.description ?? null); } if (body.notes !== undefined) { updates.push('notes = ?'); params.push(body.notes ?? null); } + if (body.lat !== undefined) { updates.push('lat = ?'); params.push(body.lat ?? null); } + if (body.lng !== undefined) { updates.push('lng = ?'); params.push(body.lng ?? null); } if (body.status !== undefined) { updates.push('status = ?'); params.push(body.status); } if (body.category_id !== undefined) { updates.push('category_id = ?'); params.push(body.category_id ?? null); } if (body.image_url !== undefined) { updates.push('image_url = ?'); params.push(body.image_url ?? null); } diff --git a/shared/src/collection/collection.schema.ts b/shared/src/collection/collection.schema.ts index 6a1dc9c26..3845fcb8d 100644 --- a/shared/src/collection/collection.schema.ts +++ b/shared/src/collection/collection.schema.ts @@ -177,6 +177,9 @@ export const collectionPlaceUpdateRequestSchema = z.object({ name: z.string().min(1).optional(), description: z.string().nullable().optional(), notes: z.string().nullable().optional(), + // Editable coordinates so a place added by GPS can be corrected later (#1435). + lat: z.number().nullable().optional(), + lng: z.number().nullable().optional(), // .removeDefault() strips the inner .default('idea') so an ABSENT status parses to // undefined (left unchanged) instead of being injected as 'idea' (see #1437). The // .catch('idea') guard against invalid values is preserved. diff --git a/shared/src/i18n/ar/collection.ts b/shared/src/i18n/ar/collection.ts index 4ffc921f0..926188b42 100644 --- a/shared/src/i18n/ar/collection.ts +++ b/shared/src/i18n/ar/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'إضافة مكان', 'collections.addPlaceSearch': 'ابحث عن مكان…', 'collections.addPlaceHint': 'ابحث لإضافة مكان إلى هذه القائمة', + 'collections.sort.default': 'افتراضي', + 'collections.sort.nameAsc': 'الاسم (أ–ي)', + 'collections.coordinates': 'الإحداثيات', 'collections.showList': 'إظهار القائمة', 'collections.expandMap': 'توسيع الخريطة', 'collections.hero.mine': 'مجموعتي', diff --git a/shared/src/i18n/br/collection.ts b/shared/src/i18n/br/collection.ts index ae3745d2d..39cfc2f52 100644 --- a/shared/src/i18n/br/collection.ts +++ b/shared/src/i18n/br/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Adicionar um lugar', 'collections.addPlaceSearch': 'Pesquisar um lugar…', 'collections.addPlaceHint': 'Pesquise para adicionar um lugar a esta lista', + 'collections.sort.default': 'Padrão', + 'collections.sort.nameAsc': 'Nome (A–Z)', + 'collections.coordinates': 'Coordenadas', 'collections.showList': 'Mostrar lista', 'collections.expandMap': 'Ampliar mapa', 'collections.hero.mine': 'Minha coleção', diff --git a/shared/src/i18n/ca/collection.ts b/shared/src/i18n/ca/collection.ts index a8741c8d5..a65521424 100644 --- a/shared/src/i18n/ca/collection.ts +++ b/shared/src/i18n/ca/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Afegir un lloc', 'collections.addPlaceSearch': 'Cercar un lloc…', 'collections.addPlaceHint': 'Cerca per afegir un lloc a aquesta llista', + 'collections.sort.default': 'Predeterminat', + 'collections.sort.nameAsc': 'Nom (A–Z)', + 'collections.coordinates': 'Coordenades', 'collections.showList': 'Mostra la llista', 'collections.expandMap': 'Ampliar el mapa', 'collections.hero.mine': 'La meva col·lecció', diff --git a/shared/src/i18n/cs/collection.ts b/shared/src/i18n/cs/collection.ts index eff3e3f46..36a09d1c4 100644 --- a/shared/src/i18n/cs/collection.ts +++ b/shared/src/i18n/cs/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Přidat místo', 'collections.addPlaceSearch': 'Hledat místo…', 'collections.addPlaceHint': 'Vyhledejte a přidejte místo do tohoto seznamu', + 'collections.sort.default': 'Výchozí', + 'collections.sort.nameAsc': 'Název (A–Z)', + 'collections.coordinates': 'Souřadnice', 'collections.showList': 'Zobrazit seznam', 'collections.expandMap': 'Zvětšit mapu', 'collections.hero.mine': 'Moje sbírka', diff --git a/shared/src/i18n/de/collection.ts b/shared/src/i18n/de/collection.ts index a10065cd4..637381a3b 100644 --- a/shared/src/i18n/de/collection.ts +++ b/shared/src/i18n/de/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Ort hinzufügen', 'collections.addPlaceSearch': 'Nach einem Ort suchen…', 'collections.addPlaceHint': 'Suchen, um einen Ort zur Liste hinzuzufügen', + 'collections.sort.default': 'Standard', + 'collections.sort.nameAsc': 'Name (A–Z)', + 'collections.coordinates': 'Koordinaten', 'collections.showList': 'Liste zeigen', 'collections.expandMap': 'Karte vergrößern', 'collections.hero.mine': 'Meine Sammlung', diff --git a/shared/src/i18n/en/collection.ts b/shared/src/i18n/en/collection.ts index fde23df32..336c6d042 100644 --- a/shared/src/i18n/en/collection.ts +++ b/shared/src/i18n/en/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Add a place', 'collections.addPlaceSearch': 'Search for a place…', 'collections.addPlaceHint': 'Search to add a place to this list', + 'collections.sort.default': 'Default', + 'collections.sort.nameAsc': 'Name (A–Z)', + 'collections.coordinates': 'Coordinates', 'collections.showList': 'Show list', 'collections.expandMap': 'Expand map', 'collections.hero.mine': 'My collection', diff --git a/shared/src/i18n/es/collection.ts b/shared/src/i18n/es/collection.ts index ab6dc0e96..9d19820f7 100644 --- a/shared/src/i18n/es/collection.ts +++ b/shared/src/i18n/es/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Añadir un lugar', 'collections.addPlaceSearch': 'Buscar un lugar…', 'collections.addPlaceHint': 'Busca para añadir un lugar a esta lista', + 'collections.sort.default': 'Predeterminado', + 'collections.sort.nameAsc': 'Nombre (A–Z)', + 'collections.coordinates': 'Coordenadas', 'collections.showList': 'Mostrar lista', 'collections.expandMap': 'Ampliar mapa', 'collections.hero.mine': 'Mi colección', diff --git a/shared/src/i18n/fr/collection.ts b/shared/src/i18n/fr/collection.ts index ca174510e..fb798f417 100644 --- a/shared/src/i18n/fr/collection.ts +++ b/shared/src/i18n/fr/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Ajouter un lieu', 'collections.addPlaceSearch': 'Rechercher un lieu…', 'collections.addPlaceHint': 'Recherchez pour ajouter un lieu à cette liste', + 'collections.sort.default': 'Par défaut', + 'collections.sort.nameAsc': 'Nom (A–Z)', + 'collections.coordinates': 'Coordonnées', 'collections.showList': 'Afficher la liste', 'collections.expandMap': 'Agrandir la carte', 'collections.hero.mine': 'Ma collection', diff --git a/shared/src/i18n/gr/collection.ts b/shared/src/i18n/gr/collection.ts index 26f68255c..7cfe467fb 100644 --- a/shared/src/i18n/gr/collection.ts +++ b/shared/src/i18n/gr/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Προσθήκη τόπου', 'collections.addPlaceSearch': 'Αναζήτηση τόπου…', 'collections.addPlaceHint': 'Αναζητήστε για να προσθέσετε έναν τόπο σε αυτήν τη λίστα', + 'collections.sort.default': 'Προεπιλογή', + 'collections.sort.nameAsc': 'Όνομα (Α–Ω)', + 'collections.coordinates': 'Συντεταγμένες', 'collections.showList': 'Εμφάνιση λίστας', 'collections.expandMap': 'Μεγέθυνση χάρτη', 'collections.hero.mine': 'Η συλλογή μου', diff --git a/shared/src/i18n/hu/collection.ts b/shared/src/i18n/hu/collection.ts index d589a76d1..8ea1e9386 100644 --- a/shared/src/i18n/hu/collection.ts +++ b/shared/src/i18n/hu/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Hely hozzáadása', 'collections.addPlaceSearch': 'Hely keresése…', 'collections.addPlaceHint': 'Keressen, hogy helyet adjon a listához', + 'collections.sort.default': 'Alapértelmezett', + 'collections.sort.nameAsc': 'Név (A–Z)', + 'collections.coordinates': 'Koordináták', 'collections.showList': 'Lista megjelenítése', 'collections.expandMap': 'Térkép nagyítása', 'collections.hero.mine': 'Saját gyűjtemény', diff --git a/shared/src/i18n/id/collection.ts b/shared/src/i18n/id/collection.ts index 8dc492e62..ecb68da0d 100644 --- a/shared/src/i18n/id/collection.ts +++ b/shared/src/i18n/id/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Tambah tempat', 'collections.addPlaceSearch': 'Cari tempat…', 'collections.addPlaceHint': 'Cari untuk menambahkan tempat ke daftar ini', + 'collections.sort.default': 'Bawaan', + 'collections.sort.nameAsc': 'Nama (A–Z)', + 'collections.coordinates': 'Koordinat', 'collections.showList': 'Tampilkan daftar', 'collections.expandMap': 'Perbesar peta', 'collections.hero.mine': 'Koleksi saya', diff --git a/shared/src/i18n/it/collection.ts b/shared/src/i18n/it/collection.ts index 6bbab9973..657b2eb6f 100644 --- a/shared/src/i18n/it/collection.ts +++ b/shared/src/i18n/it/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Aggiungi un luogo', 'collections.addPlaceSearch': 'Cerca un luogo…', 'collections.addPlaceHint': 'Cerca per aggiungere un luogo a questo elenco', + 'collections.sort.default': 'Predefinito', + 'collections.sort.nameAsc': 'Nome (A–Z)', + 'collections.coordinates': 'Coordinate', 'collections.showList': 'Mostra elenco', 'collections.expandMap': 'Espandi mappa', 'collections.hero.mine': 'La mia raccolta', diff --git a/shared/src/i18n/ja/collection.ts b/shared/src/i18n/ja/collection.ts index c20150d91..6be2f0196 100644 --- a/shared/src/i18n/ja/collection.ts +++ b/shared/src/i18n/ja/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': '場所を追加', 'collections.addPlaceSearch': '場所を検索…', 'collections.addPlaceHint': '検索してこのリストに場所を追加', + 'collections.sort.default': 'デフォルト', + 'collections.sort.nameAsc': '名前順(A–Z)', + 'collections.coordinates': '座標', 'collections.showList': 'リストを表示', 'collections.expandMap': '地図を拡大', 'collections.hero.mine': 'マイコレクション', diff --git a/shared/src/i18n/ko/collection.ts b/shared/src/i18n/ko/collection.ts index ac219ca5b..a563d72ac 100644 --- a/shared/src/i18n/ko/collection.ts +++ b/shared/src/i18n/ko/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': '장소 추가', 'collections.addPlaceSearch': '장소 검색…', 'collections.addPlaceHint': '검색하여 이 목록에 장소 추가', + 'collections.sort.default': '기본', + 'collections.sort.nameAsc': '이름순 (A–Z)', + 'collections.coordinates': '좌표', 'collections.showList': '목록 표시', 'collections.expandMap': '지도 확대', 'collections.hero.mine': '내 컬렉션', diff --git a/shared/src/i18n/nl/collection.ts b/shared/src/i18n/nl/collection.ts index 80840b5e8..b110c09e2 100644 --- a/shared/src/i18n/nl/collection.ts +++ b/shared/src/i18n/nl/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Plaats toevoegen', 'collections.addPlaceSearch': 'Zoek een plaats…', 'collections.addPlaceHint': 'Zoek om een plaats aan deze lijst toe te voegen', + 'collections.sort.default': 'Standaard', + 'collections.sort.nameAsc': 'Naam (A–Z)', + 'collections.coordinates': 'Coördinaten', 'collections.showList': 'Lijst tonen', 'collections.expandMap': 'Kaart vergroten', 'collections.hero.mine': 'Mijn collectie', diff --git a/shared/src/i18n/pl/collection.ts b/shared/src/i18n/pl/collection.ts index 98f4deaf0..2eedd1724 100644 --- a/shared/src/i18n/pl/collection.ts +++ b/shared/src/i18n/pl/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Dodaj miejsce', 'collections.addPlaceSearch': 'Wyszukaj miejsce…', 'collections.addPlaceHint': 'Wyszukaj, aby dodać miejsce do tej listy', + 'collections.sort.default': 'Domyślnie', + 'collections.sort.nameAsc': 'Nazwa (A–Z)', + 'collections.coordinates': 'Współrzędne', 'collections.showList': 'Pokaż listę', 'collections.expandMap': 'Powiększ mapę', 'collections.hero.mine': 'Moja kolekcja', diff --git a/shared/src/i18n/ru/collection.ts b/shared/src/i18n/ru/collection.ts index 18d9600d5..ecd8bd7e8 100644 --- a/shared/src/i18n/ru/collection.ts +++ b/shared/src/i18n/ru/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Добавить место', 'collections.addPlaceSearch': 'Поиск места…', 'collections.addPlaceHint': 'Найдите, чтобы добавить место в этот список', + 'collections.sort.default': 'По умолчанию', + 'collections.sort.nameAsc': 'Название (А–Я)', + 'collections.coordinates': 'Координаты', 'collections.showList': 'Показать список', 'collections.expandMap': 'Развернуть карту', 'collections.hero.mine': 'Моя коллекция', diff --git a/shared/src/i18n/sv/collection.ts b/shared/src/i18n/sv/collection.ts index d7c884dca..dea11f656 100644 --- a/shared/src/i18n/sv/collection.ts +++ b/shared/src/i18n/sv/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Lägg till en plats', 'collections.addPlaceSearch': 'Sök efter en plats…', 'collections.addPlaceHint': 'Sök för att lägga till en plats i listan', + 'collections.sort.default': 'Standard', + 'collections.sort.nameAsc': 'Namn (A–Ö)', + 'collections.coordinates': 'Koordinater', 'collections.showList': 'Visa lista', 'collections.expandMap': 'Förstora karta', 'collections.hero.mine': 'Min samling', diff --git a/shared/src/i18n/tr/collection.ts b/shared/src/i18n/tr/collection.ts index edfab4fb0..474899262 100644 --- a/shared/src/i18n/tr/collection.ts +++ b/shared/src/i18n/tr/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Yer ekle', 'collections.addPlaceSearch': 'Yer ara…', 'collections.addPlaceHint': 'Bu listeye yer eklemek için arayın', + 'collections.sort.default': 'Varsayılan', + 'collections.sort.nameAsc': 'Ad (A–Z)', + 'collections.coordinates': 'Koordinatlar', 'collections.showList': 'Listeyi göster', 'collections.expandMap': 'Haritayı genişlet', 'collections.hero.mine': 'Koleksiyonum', diff --git a/shared/src/i18n/uk/collection.ts b/shared/src/i18n/uk/collection.ts index e21b666f0..ea268dbe0 100644 --- a/shared/src/i18n/uk/collection.ts +++ b/shared/src/i18n/uk/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Додати місце', 'collections.addPlaceSearch': 'Пошук місця…', 'collections.addPlaceHint': 'Знайдіть, щоб додати місце до цього списку', + 'collections.sort.default': 'За замовчуванням', + 'collections.sort.nameAsc': 'Назва (А–Я)', + 'collections.coordinates': 'Координати', 'collections.showList': 'Показати список', 'collections.expandMap': 'Розгорнути карту', 'collections.hero.mine': 'Моя колекція', diff --git a/shared/src/i18n/vi/collection.ts b/shared/src/i18n/vi/collection.ts index 2d9e08df1..d8210e4f6 100644 --- a/shared/src/i18n/vi/collection.ts +++ b/shared/src/i18n/vi/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': 'Thêm địa điểm', 'collections.addPlaceSearch': 'Tìm địa điểm…', 'collections.addPlaceHint': 'Tìm để thêm địa điểm vào danh sách này', + 'collections.sort.default': 'Mặc định', + 'collections.sort.nameAsc': 'Tên (A–Z)', + 'collections.coordinates': 'Tọa độ', 'collections.showList': 'Hiện danh sách', 'collections.expandMap': 'Mở rộng bản đồ', 'collections.hero.mine': 'Bộ sưu tập của tôi', diff --git a/shared/src/i18n/zh-TW/collection.ts b/shared/src/i18n/zh-TW/collection.ts index 378675029..9e6c03ab8 100644 --- a/shared/src/i18n/zh-TW/collection.ts +++ b/shared/src/i18n/zh-TW/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': '新增地點', 'collections.addPlaceSearch': '搜尋地點…', 'collections.addPlaceHint': '搜尋以將地點加入此清單', + 'collections.sort.default': '預設', + 'collections.sort.nameAsc': '名稱 (A–Z)', + 'collections.coordinates': '座標', 'collections.showList': '顯示清單', 'collections.expandMap': '展開地圖', 'collections.hero.mine': '我的收藏', diff --git a/shared/src/i18n/zh/collection.ts b/shared/src/i18n/zh/collection.ts index abfee093e..82a815195 100644 --- a/shared/src/i18n/zh/collection.ts +++ b/shared/src/i18n/zh/collection.ts @@ -36,6 +36,9 @@ const collection: TranslationStrings = { 'collections.addPlace': '添加地点', 'collections.addPlaceSearch': '搜索地点…', 'collections.addPlaceHint': '搜索以将地点添加到此清单', + 'collections.sort.default': '默认', + 'collections.sort.nameAsc': '名称 (A–Z)', + 'collections.coordinates': '坐标', 'collections.showList': '显示列表', 'collections.expandMap': '展开地图', 'collections.hero.mine': '我的收藏',