Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(tours): center the empty tour list in the Tours tab like the planner rail

Maurice040e6f240543
diff --git a/client/src/components/Tours/ToursSidebar.tsx b/client/src/components/Tours/ToursSidebar.tsx
index 834af50ea..4157efc02 100644
--- a/client/src/components/Tours/ToursSidebar.tsx
+++ b/client/src/components/Tours/ToursSidebar.tsx
@@ -169,7 +169,7 @@ export default function ToursSidebar({ tripId, days, tours, loading = false, sel
<div className="trek-stagger min-h-0 flex-1 overflow-y-auto px-2 pb-2 pt-1.5">
{!loading && filtered.length === 0 ? (
<EmptyState scene="tours" size={92} fill surface="var(--bg-secondary)" title={t('tours.empty.title')}
- action={<p className="m-0 max-w-[240px] text-content-faint" style={fs(12, 'body')}>{t('tours.empty.body')}</p>} />
+ action={<p className="m-0 max-w-[260px] text-content-muted" style={fs(12, 'body')}>{t('tours.empty.body')}</p>} />
) : (
<ul role="listbox" aria-label={t('tours.mode.tours')} className="m-0 list-none p-0">
{filtered.map(tour => (
diff --git a/client/src/components/Tours/planner/TourPlannerPanels.tsx b/client/src/components/Tours/planner/TourPlannerPanels.tsx
index 84b2f48d6..8f1cd1c78 100644
--- a/client/src/components/Tours/planner/TourPlannerPanels.tsx
+++ b/client/src/components/Tours/planner/TourPlannerPanels.tsx
@@ -479,34 +479,35 @@ export function TourPlannerToursRail({ planner, tours, days, loading, onAssignTo
</div>
)}
- <TourSection label={t('tours.mode.tours')}>
- {loading && tours.length === 0 ? (
- <p className="m-0 py-6 text-center text-content-faint" style={fs(12, 'body')}>{t('common.loading')}</p>
- ) : tours.length === 0 ? (
- <EmptyState scene="tours" size={80} surface="var(--bg-secondary)" title={t('tours.empty.title')}
- className="!py-6"
- action={<p className="m-0 max-w-[240px] text-content-faint" style={fs(12, 'body')}>{t('tours.empty.body')}</p>} />
- ) : (
- <ul role="listbox" aria-label={t('tours.planner.tripTours')} className="-mx-1 m-0 list-none p-0">
- {tours.map(tour => (
- <TourListRow
- key={tour.place_id}
- tour={tour}
- disabled={isSaving}
- selected={(planner.mode.type === 'edit-saved' || planner.mode.type === 'view-gpx') && planner.mode.placeId === tour.place_id}
- onSelect={requestOpenTour}
- action={canAssign && days.length > 0 ? (
- <TourDayMenu
- days={days}
- label={`${t('tours.addToDay')}: ${tour.name}`}
- onPick={day => { if (canAssign) void onAssignToDay(tour.place_id, day.id) }}
- />
- ) : undefined}
- />
- ))}
- </ul>
- )}
- </TourSection>
+ {!loading && tours.length === 0 ? (
+ <EmptyState scene="tours" size={116} fill surface="var(--bg-secondary)" title={t('tours.empty.title')} className="flex-1"
+ action={<p className="m-0 max-w-[260px] text-content-muted" style={fs(12, 'body')}>{t('tours.empty.body')}</p>} />
+ ) : (
+ <TourSection label={t('tours.mode.tours')}>
+ {tours.length === 0 ? (
+ <p className="m-0 py-6 text-center text-content-faint" style={fs(12, 'body')}>{t('common.loading')}</p>
+ ) : (
+ <ul role="listbox" aria-label={t('tours.planner.tripTours')} className="-mx-1 m-0 list-none p-0">
+ {tours.map(tour => (
+ <TourListRow
+ key={tour.place_id}
+ tour={tour}
+ disabled={isSaving}
+ selected={(planner.mode.type === 'edit-saved' || planner.mode.type === 'view-gpx') && planner.mode.placeId === tour.place_id}
+ onSelect={requestOpenTour}
+ action={canAssign && days.length > 0 ? (
+ <TourDayMenu
+ days={days}
+ label={`${t('tours.addToDay')}: ${tour.name}`}
+ onPick={day => { if (canAssign) void onAssignToDay(tour.place_id, day.id) }}
+ />
+ ) : undefined}
+ />
+ ))}
+ </ul>
+ )}
+ </TourSection>
+ )}
</div>
<ConfirmDialog