diff --git a/client/src/components/Planner/TransitJourneyModal.tsx b/client/src/components/Planner/TransitJourneyModal.tsx index 7013dede7..33db3f9ee 100644 --- a/client/src/components/Planner/TransitJourneyModal.tsx +++ b/client/src/components/Planner/TransitJourneyModal.tsx @@ -43,6 +43,7 @@ interface TransitJourneyModalProps { export default function TransitJourneyModal({ reservation, onClose, onSave, onDelete, onChangeRoute, canEdit }: TransitJourneyModalProps) { const { t, locale } = useTranslation() + const isMobile = typeof window !== 'undefined' && window.innerWidth < 768 const timeFormat = useSettingsStore(st => st.settings.time_format) || '24h' const res = reservation const meta = typeof res.metadata === 'string' ? (() => { try { return JSON.parse(res.metadata || '{}') } catch { return {} } })() : (res.metadata || {}) @@ -139,14 +140,14 @@ export default function TransitJourneyModal({ reservation, onClose, onSave, onDe title={t('transit.journey')} size="2xl" footer={ -
+
{canEdit && ( - )}
@@ -178,8 +179,8 @@ export default function TransitJourneyModal({ reservation, onClose, onSave, onDe
{/* header: icon + inline-renamable title + date/time */}
-
- +
+
{editingTitle ? ( @@ -212,22 +213,30 @@ export default function TransitJourneyModal({ reservation, onClose, onSave, onDe {transit && ( <> {/* journey stats — three full-width tiles */} -
+
{statTiles.map(({ Icon, value, label }, i) => ( -
-
- + isMobile ? ( +
+ +
{value}
+
{label}
-
-
{value}
-
{label}
+ ) : ( +
+
+ +
+
+
{value}
+
{label}
+
-
+ ) ))}
{/* stop-by-stop itinerary */} -
+
{t('transit.itinerary')}
@@ -236,8 +245,8 @@ export default function TransitJourneyModal({ reservation, onClose, onSave, onDe if (leg.mode === 'WALK') return const mins = leg.duration ? Math.round(leg.duration / 60) : null return ( -
-
+
+
{leg.from?.time || ''}
diff --git a/client/src/components/Planner/TransitSearchPanel.tsx b/client/src/components/Planner/TransitSearchPanel.tsx index ae219e987..8b884b0ee 100644 --- a/client/src/components/Planner/TransitSearchPanel.tsx +++ b/client/src/components/Planner/TransitSearchPanel.tsx @@ -322,6 +322,7 @@ export default function TransitSearchPanel({ day, days, places, accommodations = const { t } = useTranslation() const toast = useToast() const is12h = useSettingsStore(s => s.settings.time_format) === '12h' + const isMobile = typeof window !== 'undefined' && window.innerWidth < 768 const [from, setFrom] = useState(initialFrom) const [to, setTo] = useState(initialTo) @@ -485,15 +486,15 @@ export default function TransitSearchPanel({ day, days, places, accommodations = return (
- {/* from / to */} -
+ {/* from / to — stacked on mobile with the swap between the fields */} +
@@ -518,10 +519,10 @@ export default function TransitSearchPanel({ day, days, places, accommodations = )}
-
- - - +
+ + +
@@ -553,7 +554,7 @@ export default function TransitSearchPanel({ day, days, places, accommodations = onClick={search} disabled={!from || !to || loading} className="bg-accent text-accent-text" - style={{ display: 'inline-flex', alignItems: 'center', gap: 6, border: 'none', borderRadius: 10, padding: '9px 18px', fontWeight: 600, fontSize: 'calc(13px * var(--fs-scale-body, 1))', cursor: (!from || !to || loading) ? 'default' : 'pointer', fontFamily: 'inherit', opacity: (!from || !to || loading) ? 0.55 : 1, flexShrink: 0 }} + style={{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 6, border: 'none', borderRadius: 10, padding: '9px 18px', fontWeight: 600, fontSize: 'calc(13px * var(--fs-scale-body, 1))', cursor: (!from || !to || loading) ? 'default' : 'pointer', fontFamily: 'inherit', opacity: (!from || !to || loading) ? 0.55 : 1, flexShrink: 0, width: isMobile ? '100%' : undefined }} > {loading ? t('transit.searching') : t('transit.search')} diff --git a/client/src/components/Planner/TransportModal.tsx b/client/src/components/Planner/TransportModal.tsx index 7f9e13206..658485da3 100644 --- a/client/src/components/Planner/TransportModal.tsx +++ b/client/src/components/Planner/TransportModal.tsx @@ -520,7 +520,7 @@ export function TransportModal({ isOpen, onClose, onSave, reservation, days, sel
{t('transit.title')}
{t('transit.searchHint')}
-
+
set('start_day_id', v)} placeholder={t('dayplan.dayN', { n: '?' })} options={dayOptions} size="sm" />