mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 02:14:05 +00:00
fix(planner): align the day route controls
This commit is contained in:
@@ -2521,7 +2521,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
|
||||
{/* Routen-Werkzeuge (ausgewählter Tag, 2+ Orte — oder 1 Ort mit Hotel-Bookend #1330 — oder Hotel-zu-Hotel-Transfertag ohne Orte #1297) */}
|
||||
{showRouteTools && (
|
||||
<div data-dp="route-tools" className="mt-1 flex flex-col gap-2 border-t border-edge-faint px-1 pb-0.5 pt-2">
|
||||
<div className="flex items-center gap-1">
|
||||
<div className="trek-desktop-panel flex flex-wrap items-center gap-2">
|
||||
<button type="button"
|
||||
onClick={() => {
|
||||
if (showRouteToolsWhenExpanded) {
|
||||
@@ -2544,11 +2544,12 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
|
||||
className={`inline-flex h-8 flex-none items-center gap-1.5 rounded-[10px] px-3 font-semibold transition-colors ${routeActive ? 'bg-accent text-accent-text' : `${ROUTE_TOOL} text-content-secondary hover:text-content`}`}
|
||||
style={fs(12, 'body')}
|
||||
>
|
||||
<RouteIcon size={13} strokeWidth={2.2} />
|
||||
<RouteIcon size={14} strokeWidth={2} />
|
||||
{!narrowPanel && t('dayplan.route')}
|
||||
</button>
|
||||
{/* The day's travel mode as one segmented control. */}
|
||||
<div className={`inline-flex h-8 flex-none items-center gap-0.5 rounded-[10px] p-[3px] ${ROUTE_TOOL}`}>
|
||||
<div role="group" aria-label={t('dayplan.transportMode.change')}
|
||||
className={`inline-flex h-8 flex-none items-center gap-1 rounded-[10px] px-1 ${ROUTE_TOOL}`}>
|
||||
{routeProfileOptions.map(p => {
|
||||
const ModeIcon = routeModeIcon(p.key)
|
||||
const active = (day.default_transport_mode ?? routeProfile) === p.key
|
||||
@@ -2558,15 +2559,14 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
|
||||
onClick={() => setDayDefaultMode(day.id, p.key)}
|
||||
aria-label={p.label}
|
||||
aria-pressed={active}
|
||||
className={`grid h-[26px] w-8 place-items-center rounded-[7px] transition-colors ${active ? 'bg-surface-tertiary text-content' : 'text-content-muted hover:text-content'}`}
|
||||
className={`grid h-6 w-8 place-items-center rounded-md transition-colors ${active ? 'bg-surface-selected text-content' : 'text-content-muted hover:bg-surface-hover hover:text-content'}`}
|
||||
>
|
||||
<ModeIcon size={13} strokeWidth={2} />
|
||||
<ModeIcon size={14} strokeWidth={2} />
|
||||
</button>
|
||||
</Tooltip>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<span className="flex-1" />
|
||||
{/* Icon-only (#1981): the label stays as the accessible name and the tooltip. */}
|
||||
<BarButton label={t('dayplan.optimize')} onClick={() => handleOptimize(day.id)} placement="top" className={ROUTE_TOOL}>
|
||||
<RotateCcw size={14} strokeWidth={2} />
|
||||
|
||||
Reference in New Issue
Block a user