diff --git a/client/src/components/Assistant/AssistantChangeCard.tsx b/client/src/components/Assistant/AssistantChangeCard.tsx index ddc631b81..319c4373a 100644 --- a/client/src/components/Assistant/AssistantChangeCard.tsx +++ b/client/src/components/Assistant/AssistantChangeCard.tsx @@ -1,10 +1,11 @@ -import { Check, LoaderCircle, MapPin, Undo2 } from 'lucide-react'; +import { Check, CheckCheck, ListChecks, LoaderCircle, MapPin, Undo2 } from 'lucide-react'; import { type ReactNode, useEffect, useMemo, useState } from 'react'; import { useTranslation } from '../../i18n'; import { blockKeyOf } from '../../store/assistantMapModel'; import { chatOf, useAssistantStore } from '../../store/assistantStore'; import { useTripStore } from '../../store/tripStore'; +import { DialogButton, NEUTRAL_TINT } from '../shared/DialogShell'; import { useToast } from '../shared/Toast'; import { Tooltip } from '../shared/Tooltip'; import AssistantCompareSwitch from './AssistantCompareSwitch'; @@ -13,6 +14,8 @@ import AssistantWeekOverview from './AssistantWeekOverview'; import { type ChangeItem, undoLeftMs } from './assistantParts'; import { useAssistantView } from './assistantViewContext'; import { ChangeRows } from './cards/ChangeCardSlots'; +import CardHeader from './cards/parts/CardHeader'; +import { CardFoot } from './cards/parts/CardSection'; import { ICON_BUTTON } from './cards/parts/assistantTones'; import { useChangeExclusions } from './cards/useChangeExclusions'; import { changePoints, type DayChange } from './dayAfterModel'; @@ -60,6 +63,9 @@ function undoableNow(item: ChangeItem, undone: Readonly>, n ); } +/** The band of a card whose changes are all decided: the green of a done booking. */ +const DONE_TINT = 'color-mix(in srgb, var(--success) 9%, transparent)'; + /** The waiting changes the user left on that touch the day plan. */ function dayChangesOf(items: readonly ChangeItem[], excluded: ReadonlySet): DayChange[] { return items.flatMap((i) => @@ -69,17 +75,18 @@ function dayChangesOf(items: readonly ChangeItem[], excluded: ReadonlySet - - {t(open ? 'assistant.change.title' : 'assistant.change.doneTitle')} - - {actions} - {count} - + ); } @@ -224,7 +231,7 @@ export default function AssistantChangeCard({ items }: { items: ChangeItem[] }) const open = pending.length > 0; return ( -
+
{t('assistant.change.pending', { count: pending.length })}

-
- - -
+ + )}
diff --git a/client/src/components/Assistant/cards/atlas/AtlasCountryCard.tsx b/client/src/components/Assistant/cards/atlas/AtlasCountryCard.tsx index 1a2d421e4..4aa3113d8 100644 --- a/client/src/components/Assistant/cards/atlas/AtlasCountryCard.tsx +++ b/client/src/components/Assistant/cards/atlas/AtlasCountryCard.tsx @@ -1,5 +1,5 @@ import type { AssistantMessage, AtlasCountryCard as CountryCard } from '@trek/shared'; -import { Briefcase, MapPin, Radio } from 'lucide-react'; +import { Briefcase, Globe2, MapPin, Radio } from 'lucide-react'; import { useTranslation } from '../../../../i18n'; import { SoftPill, WhiteBadge } from '../../../Planner/planParts'; @@ -8,8 +8,10 @@ import type { ChangeItem } from '../../assistantParts'; import type { CardEntry } from '../cardTypes'; import { CardFacts } from '../parts/CardFacts'; import CardFrame from '../parts/CardFrame'; +import CardHeader from '../parts/CardHeader'; import { CardOpenButton } from '../parts/CardOpen'; import { CardMore } from '../parts/CardRows'; +import { CardFoot } from '../parts/CardSection'; import { CONTINENT_LABEL, continentOf, shortDay, STATUS_LOOK } from './atlasCardModel'; import { ATLAS_PAGE } from './atlasPage'; import { ChangeFlag, FlagTile, StatusFact } from './AtlasParts'; @@ -112,14 +114,15 @@ export default function AtlasCountryBlock({ cards }: { cards: readonly CardEntry if (countries.length === 0) return null; return ( + {countries.map((entry, index) => (
0 ? 'mt-2 border-t border-edge-faint pt-2' : ''}> {entry.card.kind === 'atlasCountry' && }
))} -
+ -
+
); } diff --git a/client/src/components/Assistant/cards/budget/ExpenseChange.tsx b/client/src/components/Assistant/cards/budget/ExpenseChange.tsx index 884507073..e6d2c287e 100644 --- a/client/src/components/Assistant/cards/budget/ExpenseChange.tsx +++ b/client/src/components/Assistant/cards/budget/ExpenseChange.tsx @@ -78,7 +78,6 @@ export function ExpenseFacts({ card }: SlotProps) { <> - {row.place && } {split && ( - + + + {row.place && } + + {row.note && } ); diff --git a/client/src/components/Assistant/cards/budget/ExpensesCard.test.tsx b/client/src/components/Assistant/cards/budget/ExpensesCard.test.tsx index 88806cafb..c3be00c47 100644 --- a/client/src/components/Assistant/cards/budget/ExpensesCard.test.tsx +++ b/client/src/components/Assistant/cards/budget/ExpensesCard.test.tsx @@ -121,8 +121,7 @@ describe('an expense in a change row', () => { expect(screen.getByText(money(84))).toHaveClass('line-through'); }); - it('FE-AI-CARD-BUD-012: the facts name the category, day and place, and what an update changes', () => { - const onOpen = vi.fn(); + it('FE-AI-CARD-BUD-012: the facts name the category and day, and what an update changes', () => { const update = expense({ category: 'transport', date: '2026-06-05', @@ -132,7 +131,7 @@ describe('an expense in a change row', () => { split: 'equal', before: { name: null, amount: null, category: 'food', date: '2026-06-03', split: 'custom' }, }); - inView(, { onOpen }); + inView(); expect(screen.getByText('Food & drink')).toHaveClass('line-through'); expect(screen.getByText('Transport')).toBeInTheDocument(); expect(screen.getByText('Split unevenly')).toHaveClass('line-through'); @@ -140,6 +139,14 @@ describe('an expense in a change row', () => { expect(screen.getByText('1 receipt')).toBeInTheDocument(); // The note is too long for the faint line beside the row's buttons: it sits under the row. expect(screen.queryByText('Window table')).toBeNull(); + // The place sits under the row, beside the split. + expect(screen.queryByText('Lokanta')).toBeNull(); + }); + + it('FE-AI-CARD-BUD-012c: the place sits under the row beside the split, and opens on the map', () => { + const onOpen = vi.fn(); + const row = expense({ place: { id: 12, name: 'Lokanta' } }); + inView(, { onOpen }); fireEvent.click(screen.getByRole('button', { name: /Lokanta/ })); expect(onOpen).toHaveBeenCalledWith({ kind: 'map', placeId: 12, dayId: null }); }); diff --git a/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx b/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx index 9d351bf7f..e30f101bf 100644 --- a/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx +++ b/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx @@ -1,15 +1,16 @@ import type { AssistantMessage, JourneyEntryLook } from '@trek/shared'; -import { ArrowUpRight } from 'lucide-react'; +import { ArrowUpRight, BookOpen } from 'lucide-react'; import { useMemo } from 'react'; import { useTranslation } from '../../../../i18n'; import { DAY_COLORS } from '../../../Journey/dayColors'; import { cardTitle } from '../../../Journey/journeyCard'; import JourneyEntryCover from '../../../Journey/JourneyEntryCover'; -import { LinkedJournalIcon } from '../../../Trips/LinkedJournalIcon'; import { useAssistantView } from '../../assistantViewContext'; import type { CardEntry } from '../cardTypes'; import CardFrame from '../parts/CardFrame'; +import CardHeader from '../parts/CardHeader'; +import { CardFoot } from '../parts/CardSection'; import CardStrip from '../parts/CardStrip'; import { type JournalEntries, coverEntryOf, mergeJournalCards, titleSourceOf } from './journeyCardModel'; import { EntryMarks, EntryStory, EntryThumb, EntryWhen } from './JourneyEntryParts'; @@ -34,8 +35,6 @@ const TITLE_BUTTON = /** The phone's taller target, the title still at the top of the row. */ const TITLE_BUTTON_TALL = `${TITLE_BUTTON} min-h-10`; const FOOTER = 'mt-1 flex items-center gap-2 border-t border-edge-faint pt-2 text-caption'; -const FOOTER_TITLE = 'min-w-0 flex-1 truncate text-content-muted'; -const FAINT = 'text-content-faint'; const OPEN = 'inline-flex flex-none items-center gap-1 font-medium text-accent hover:underline'; const OPEN_TALL = 'inline-flex h-10 flex-none items-center gap-1 font-medium text-accent hover:underline'; /** The size and corners of the journal's own tile, so the count stands in the row like one more entry. */ @@ -51,23 +50,23 @@ type Open = ((entryId: number | null) => void) | null; function JournalFooter({ journal, open }: { journal: JournalEntries; open: Open }) { const { t } = useTranslation(); const { variant } = useAssistantView(); + if (!open) return null; + return ( + + + + ); +} + +/** The band of the entries: the journal's name, and how many entries it holds once there are more than two. */ +function JournalHead({ journal }: { journal: JournalEntries }) { + const { t } = useTranslation(); const title = journal.journalTitle ?? t('assistant.card.journey.label'); const count = journal.entries.length + journal.more; - return ( -
- - - {title} - {count > 2 && {t('assistant.card.journey.entries', { count })}} - - {open && ( - - )} -
- ); + return 2 ? count : undefined} />; } /** One entry as a row: its photo, its title (the way to it), its facts and the start of its text. */ @@ -116,6 +115,7 @@ function JournalRows({ journal, fallbackRef }: { journal: JournalEntries; fallba const hover = useEntryHover(journal.journeyId, fallbackRef); return ( + {journal.entries.map((look, index) => ( 0} open={open} hover={hover} /> ))} diff --git a/client/src/components/Assistant/cards/packing/PackingListCard.tsx b/client/src/components/Assistant/cards/packing/PackingListCard.tsx index 9102578d3..328710e16 100644 --- a/client/src/components/Assistant/cards/packing/PackingListCard.tsx +++ b/client/src/components/Assistant/cards/packing/PackingListCard.tsx @@ -1,14 +1,16 @@ import type { PackingListCard as PackingCard, PackingCardGroup } from '@trek/shared'; -import { Check } from 'lucide-react'; +import { Backpack, Check } from 'lucide-react'; import { useTranslation } from '../../../../i18n'; import { SoftPill } from '../../../Planner/planParts'; -import { PackedBar, PackTile } from '../../../Tours/packing/packingLinkParts'; +import { PackedBar } from '../../../Tours/packing/packingLinkParts'; import AssistantChangeFields from '../../AssistantChangeFields'; import type { ChangeItem } from '../../assistantParts'; import type { CardEntry, EntityTarget } from '../cardTypes'; import CardFrame from '../parts/CardFrame'; -import { isRunnable, mergePackingCards, packingColorOf, rowCount } from './checklistModel'; +import CardHeader from '../parts/CardHeader'; +import { CardFoot } from '../parts/CardSection'; +import { isRunnable, mergePackingCards, rowCount } from './checklistModel'; import { ChecklistFoot, ChecklistRun, type RunEntry, type RunProps } from './checklistParts'; import { PackingGroup, PackingRowAside, PackingRowFacts } from './packingParts'; @@ -62,7 +64,7 @@ function useTitle(card: PackingCard): string { : t('assistant.card.packing.title'); } -/** The head of an answer: the tile with the count, the title, how much is packed, and "All packed" once it is. */ +/** The head band of an answer: the backpack, the title, how much is packed with its bar, and "All packed" once it is. */ function PackingHead({ card }: { card: PackingCard }) { const { t } = useTranslation(); const title = useTitle(card); @@ -73,50 +75,46 @@ function PackingHead({ card }: { card: PackingCard }) { if (source.type === 'tour') caption = t('assistant.card.packing.forTour'); else if (source.type === 'template') caption = t('assistant.card.packing.templateAdds', { count: source.itemCount }); else if (card.progress && total > 0) caption = t('tours.packing.packed', { packed, count: total }); - const first = card.groups[0]?.key; - const color = - source.type === 'tour' && source.category !== null && first?.by === 'category' - ? packingColorOf(first.slot, source.category) - : null; + const done = card.progress !== null && total > 0 && packed === total; return ( -
- -
-

- {title} -

- {caption && ( -

- {caption} -

- )} -
- {card.progress && total > 0 && packed === total && ( - }> - {t('tours.packing.allPacked')} - + }> + {t('tours.packing.allPacked')} + + ) : undefined + } + > + {card.progress && card.progress.total > 0 && ( +
+ +
)} -
+
); } /** One answer card. */ function PackingAnswer({ card }: { card: PackingCard }) { const title = useTitle(card); - const progress = card.progress; return ( -
- - {progress && progress.total > 0 && } - + + + -
+
); } diff --git a/client/src/components/Assistant/cards/packing/TodoListCard.tsx b/client/src/components/Assistant/cards/packing/TodoListCard.tsx index e617a8e2a..ae7804888 100644 --- a/client/src/components/Assistant/cards/packing/TodoListCard.tsx +++ b/client/src/components/Assistant/cards/packing/TodoListCard.tsx @@ -6,14 +6,15 @@ import { type PillTone, SoftPill, WhiteBadge } from '../../../Planner/planParts' import { localToday } from '../../../Planner/today'; import { Tooltip } from '../../../shared/Tooltip'; import { PRIO_CONFIG } from '../../../Todo/todoListModel'; -import { PackTile } from '../../../Tours/packing/packingLinkParts'; import AssistantChangeFields from '../../AssistantChangeFields'; import type { ChangeItem } from '../../assistantParts'; import { useAssistantView } from '../../assistantViewContext'; import type { CardEntry, EntityTarget } from '../cardTypes'; import { ChangeMark, FactChange, NoLonger } from '../parts/CardFacts'; import CardFrame from '../parts/CardFrame'; +import CardHeader from '../parts/CardHeader'; import { PersonFace } from '../parts/CardPeople'; +import { CardFoot } from '../parts/CardSection'; import { useCardFormat } from '../parts/useCardFormat'; import { isRunnable, mergeTodoCards, todoColorOf } from './checklistModel'; import { @@ -204,27 +205,30 @@ function TodoAnswer({ card }: { card: TodoCard }) { const title = t('assistant.card.todo.title'); return ( -
-
- -

{title}

- {progress && {t('assistant.card.todo.openCount', { count: progress.open })}} - {progress && progress.overdue > 0 && ( + 0 ? 'danger' : 'info'} + title={title} + meta={progress ? t('assistant.card.todo.openCount', { count: progress.open }) : undefined} + actions={ + progress && progress.overdue > 0 ? ( {t('assistant.card.todo.overdueCount', { count: progress.overdue })} - )} -
-
- {card.groups.map((group) => ( - - ))} -
+ ) : undefined + } + /> +
+ {card.groups.map((group) => ( + + ))} +
+ -
+
); } diff --git a/client/src/components/Assistant/cards/packing/checklistParts.tsx b/client/src/components/Assistant/cards/packing/checklistParts.tsx index 25ae19e77..e689437a7 100644 --- a/client/src/components/Assistant/cards/packing/checklistParts.tsx +++ b/client/src/components/Assistant/cards/packing/checklistParts.tsx @@ -90,7 +90,7 @@ export function ChecklistRow({ > {name} - {aside && {aside}} + {aside && {aside}} {under} diff --git a/client/src/components/Assistant/cards/packing/packingParts.tsx b/client/src/components/Assistant/cards/packing/packingParts.tsx index bde5e98c0..e8240a58c 100644 --- a/client/src/components/Assistant/cards/packing/packingParts.tsx +++ b/client/src/components/Assistant/cards/packing/packingParts.tsx @@ -7,7 +7,6 @@ import { formatWeight } from '../../../Packing/packingListModel'; import { bagFillPct } from '../../../Packing/packingListPanel.helpers'; import { SoftPill, WhiteBadge } from '../../../Planner/planParts'; import { Tooltip } from '../../../shared/Tooltip'; -import { CountBadge } from '../../../Tours/packing/packingLinkParts'; import { ChangeMark, FactChange, NoLonger } from '../parts/CardFacts'; import { PeopleStack, PersonFace } from '../parts/CardPeople'; import { packingColorOf } from './checklistModel'; @@ -56,15 +55,31 @@ function BagSwatch({ bag, size = 'row' }: { bag: PackingCardBag | undefined; siz * What a row says at its end: how many, how many packed, its weight, its tier * and its bag. A bag the card does not carry draws nothing rather than "Unassigned". */ +/** A row's quantity and weight: quiet figures at its end, no frame each. */ +const QUIET = 'text-caption tabular-nums text-content-muted'; + +/** How many rows a group holds, quiet beside its name. */ +function GroupCount({ count }: { count: number }) { + const { t } = useTranslation(); + return ( + + {count} + + ); +} + export function PackingRowAside({ row, bag }: { row: PackingCardItem; bag: PackingCardBag | undefined }) { const { t } = useTranslation(); const personal = t('assistant.card.packing.tierPersonal'); const partial = !row.checked && row.packed > 0 && row.packed < row.quantity; return ( <> - {row.quantity > 1 && ×{row.quantity}} - {partial && {`${row.packed}/${row.quantity}`}} - {row.weightGrams !== null && {formatWeight(row.weightGrams)}} + {row.quantity > 1 && ×{row.quantity}} + {partial && {`${row.packed}/${row.quantity}`}} + {row.weightGrams !== null && {formatWeight(row.weightGrams)}} {row.tier === 'personal' && ( @@ -216,7 +231,7 @@ function BagHead({ }) { const { t } = useTranslation(); if (!bag) { - const badge = inChange ? undefined : ; + const badge = inChange ? undefined : ; const lead = ; return ; } @@ -283,7 +298,7 @@ export function PackingGroup({ } + badge={inChange ? undefined : } people={group.assignees} removed={group.assigneesRemoved} /> diff --git a/client/src/components/Assistant/cards/parts/CardFrame.tsx b/client/src/components/Assistant/cards/parts/CardFrame.tsx index 201412e8f..03e59e2f0 100644 --- a/client/src/components/Assistant/cards/parts/CardFrame.tsx +++ b/client/src/components/Assistant/cards/parts/CardFrame.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; /** * The frame every answer card sits in, the same as the change card's: a - * rounded card on the chat. A waiting change shows its frame dashed, a + * rounded card on the chat whose head band (CardHeader) runs to its edges. A waiting change shows its frame dashed, a * removed one faded, a settled one (discarded, expired, undone) fainter * still. The chat card (a message in the trip chat) sits on the quieter * secondary surface. @@ -32,7 +32,7 @@ export default function CardFrame({ return (
diff --git a/client/src/components/Assistant/cards/parts/CardHeader.tsx b/client/src/components/Assistant/cards/parts/CardHeader.tsx index cf69eab0e..bc180ee7f 100644 --- a/client/src/components/Assistant/cards/parts/CardHeader.tsx +++ b/client/src/components/Assistant/cards/parts/CardHeader.tsx @@ -1,43 +1,94 @@ import type { LucideIcon } from 'lucide-react'; import type { ReactNode } from 'react'; -import { WhiteBadge } from '../../../Planner/planParts'; +import { fs, NEUTRAL_TINT } from '../../../shared/DialogShell'; import type { Tone } from './assistantTones'; -import KindTile from './KindTile'; /** - * The head of an answer card: its tile, what it is about (wrapping to two - * lines at most, the whole title in its tooltip), how many it holds, one - * quiet line of context under it, and its actions at the end. + * The head band of an answer card, as the trip's dialogs and booking cards + * wear it: a tinted band across the card's top, a raised white tile with the + * icon of what the card is about in its tone, an eyebrow naming the kind, + * the title, one quiet line under it, a count, and the card's actions at the + * end. It reaches the card's edges, so a card that opens with it needs no + * other head. */ + +/** The icon's colour on the white tile, per tone. */ +const GLYPH: Record = { + success: 'text-success', + info: 'text-info', + warning: 'text-warning', + danger: 'text-danger', +}; + export default function CardHeader({ - icon, + icon: Icon, tone, title, + eyebrow, count, meta, actions, + tile, + tint = NEUTRAL_TINT, + children, }: { icon: LucideIcon; tone: Tone; title: string; + /** The kind above the title ("PACKING LIST"); none when the title says it. */ + eyebrow?: string; count?: number; meta?: ReactNode; actions?: ReactNode; + /** In place of the icon tile: a drawing of what the card shows (a route's sketch). */ + tile?: ReactNode; + tint?: string; + /** Under the title row, on the band: a progress bar, a row of pills. */ + children?: ReactNode; }) { return ( -
- -
-
- - {title} - - {count !== undefined && {count}} +
+
+ {tile ?? ( + + )} +
+ {eyebrow && ( +
+ {eyebrow} +
+ )} +
+ + {title} + + {count !== undefined && ( + + {count} + + )} +
+ {meta &&
{meta}
}
- {meta &&
{meta}
} + {actions &&
{actions}
}
- {actions &&
{actions}
} + {children}
); } diff --git a/client/src/components/Assistant/cards/parts/CardRows.tsx b/client/src/components/Assistant/cards/parts/CardRows.tsx index 2e754c143..ef326fe4d 100644 --- a/client/src/components/Assistant/cards/parts/CardRows.tsx +++ b/client/src/components/Assistant/cards/parts/CardRows.tsx @@ -44,7 +44,11 @@ export function CardRow({ {title} {facts} - {aside && {aside}} + {aside && ( + + {aside} + + )} ); const hover = onHover diff --git a/client/src/components/Assistant/cards/parts/CardSection.tsx b/client/src/components/Assistant/cards/parts/CardSection.tsx new file mode 100644 index 000000000..08d67d1f0 --- /dev/null +++ b/client/src/components/Assistant/cards/parts/CardSection.tsx @@ -0,0 +1,49 @@ +import type { ReactNode } from 'react'; + +import { Eyebrow, Field } from '../../../Planner/bookings/bookingParts'; + +/** + * The body of an answer card in the trip dialogs' look: sections under an + * eyebrow of their own, figures as framed fields with their label over them + * (the field every booking card is made of), and a foot bar for the card's + * ways onward, set off by a line across the card. + */ + +/** One part of a card under its eyebrow, with room for something on the right of the label. */ +export function CardSection({ label, aside, children }: { label: string; aside?: ReactNode; children: ReactNode }) { + return ( +
+
+ {label} + {aside && {aside}} +
+ {children} +
+ ); +} + +/** A card's figures, side by side in framed fields: as many columns as figures, at most four. */ +export function CardFields({ fields }: { fields: readonly { key: string; label: string; value: ReactNode }[] }) { + if (fields.length === 0) return null; + const columns = ['grid-cols-1', 'grid-cols-2', 'grid-cols-3', 'grid-cols-4'][Math.min(fields.length, 4) - 1]; + return ( +
+ {fields.map((field) => ( +
+ + {field.value} + +
+ ))} +
+ ); +} + +/** The foot of a card: its actions at the end, under a line that runs to the card's edges. */ +export function CardFoot({ children }: { children: ReactNode }) { + return ( +
+ {children} +
+ ); +} diff --git a/client/src/components/Assistant/cards/tour/TourFigureLine.tsx b/client/src/components/Assistant/cards/tour/TourFigureLine.tsx new file mode 100644 index 000000000..0a28caad9 --- /dev/null +++ b/client/src/components/Assistant/cards/tour/TourFigureLine.tsx @@ -0,0 +1,46 @@ +import { Clock, MoveHorizontal, TrendingUp } from 'lucide-react'; +import type { ReactNode } from 'react'; + +import type { DistanceUnit } from '../../../../types'; +import { formatDistance, formatElevation } from '../../../../utils/units'; +import type { LegVariant } from '../../../Tours/planner/legVariants'; +import { formatTourDuration } from '../../../Tours/planner/tourDurationInput'; + +/** + * A way's length, climb and time as one quiet line of glyphs and values, + * without a frame around each: what a choice of ways and a change row show + * where framed fields would crowd the row. + */ + +/** One figure of a way: its glyph and its value, quiet, in a line of them. */ +function Figure({ name, icon, children }: { name: string; icon: ReactNode; children: ReactNode }) { + return ( + + {icon} + {children} + + ); +} + +const GLYPH = { size: 11, strokeWidth: 2.2, 'aria-hidden': true, className: 'flex-none text-content-faint' } as const; + +/** A way's length, climb and time in one quiet line. */ +export default function WayFigures({ way, unit }: { way: LegVariant; unit: DistanceUnit }) { + return ( + +
}> + {formatDistance(way.distanceM / 1000, unit)} +
+ {way.gainM !== null && ( +
}> + {formatElevation(way.gainM, unit)} +
+ )} + {way.minutes !== null && ( +
}> + {formatTourDuration(way.minutes)} +
+ )} +
+ ); +} diff --git a/client/src/components/Assistant/cards/tour/TourRouteActions.tsx b/client/src/components/Assistant/cards/tour/TourRouteActions.tsx index 455703b62..f5461c231 100644 --- a/client/src/components/Assistant/cards/tour/TourRouteActions.tsx +++ b/client/src/components/Assistant/cards/tour/TourRouteActions.tsx @@ -5,6 +5,7 @@ import { useTranslation } from '../../../../i18n'; import { SoftPill } from '../../../Planner/planParts'; import { useAssistantView } from '../../assistantViewContext'; import { CardOpenButton } from '../parts/CardOpen'; +import { CardFoot } from '../parts/CardSection'; import { tourTarget } from './tourLook'; import { useTakeProposal } from './useTourRouteCard'; @@ -58,7 +59,7 @@ export default function TourRouteActions({ if (take.state === 'failed') caption = t('assistant.card.tour.askAgain'); else if (take.state !== 'taken' && take.reasonKey) caption = t(take.reasonKey); return ( -
+
+
); } diff --git a/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx b/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx index db81a0b0d..644b31146 100644 --- a/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx +++ b/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx @@ -115,11 +115,11 @@ afterEach(() => { }); describe('TourRouteCard', () => { - it('FE-AI-TOUR-021: states the name, the figures as badges, the day and the hardest grade, uncertain when little is graded', () => { + it('FE-AI-TOUR-021: states the name, the figures as framed fields, the day and the hardest grade, uncertain when little is graded', () => { const { container } = renderCard(HIKE); expect(screen.getByText('Hochfelln from Bergen')).toBeInTheDocument(); for (const figure of ['time', 'distance', 'ascent', 'descent']) { - expect(container.querySelector(`[data-figure="${figure}"]`)).not.toBeNull(); + expect(container.querySelector(`[data-field="${figure}"]`)).not.toBeNull(); } expect(screen.getByText('8.2 km')).toBeInTheDocument(); expect(screen.getAllByText('640 m')).toHaveLength(2); @@ -159,7 +159,7 @@ describe('TourRouteCard', () => { it('FE-AI-TOUR-024: a stop chip moves the spot in focus to the stop while pointed at', () => { renderCard(HIKE); - const hut = screen.getByRole('button', { name: 'Strausshütte, 09:40' }); + const hut = screen.getByRole('button', { name: /^Strausshütte, 09:40/ }); fireEvent.mouseEnter(hut); expect(useAssistantStore.getState().routeFocus?.focus.distanceMeters).toBeCloseTo(2400, 0); fireEvent.mouseLeave(hut); @@ -171,11 +171,11 @@ describe('TourRouteCard', () => { it('FE-AI-TOUR-024b: the stops run as a timeline, each walk on the line between two stops and read with the one it leads to', () => { renderCard(HIKE); const list = screen.getByRole('list', { name: 'Stops along the way' }); - // One row per stop; the lines between them are not rows. - expect(list.querySelectorAll('[role="listitem"]')).toHaveLength(5); + // One row per stop; the walks between them are hidden, read with the stop they lead to. + expect(list.querySelectorAll('li:not([aria-hidden="true"])')).toHaveLength(5); // The place beside the way has no time: the hut measures from the start, then each stop from the last. expect(screen.getAllByText(/from the last stop$/)).toHaveLength(3); - const legs = [...list.querySelectorAll('[aria-hidden="true"]')].map((leg) => leg.textContent).filter(Boolean); + const legs = [...list.querySelectorAll('li[aria-hidden="true"]')].map((leg) => leg.textContent).filter(Boolean); expect(legs).toHaveLength(3); }); diff --git a/client/src/components/Assistant/cards/tour/TourRouteCard.tsx b/client/src/components/Assistant/cards/tour/TourRouteCard.tsx index e80b6aea6..1fa6bcd89 100644 --- a/client/src/components/Assistant/cards/tour/TourRouteCard.tsx +++ b/client/src/components/Assistant/cards/tour/TourRouteCard.tsx @@ -4,11 +4,11 @@ import { useMemo } from 'react'; import { useTranslation } from '../../../../i18n'; import type { DistanceIndexedProfileSample } from '../../../../utils/routeGeometry'; import { variantPaintCss } from '../../../Tours/planner/legVariantPaint'; -import { useAssistantView } from '../../assistantViewContext'; import CardFrame from '../parts/CardFrame'; +import { CardSection } from '../parts/CardSection'; import TourRouteActions from './TourRouteActions'; import TourRouteDay from './TourRouteDay'; -import TourRouteHead from './TourRouteHead'; +import TourRouteHead, { TourRouteFields } from './TourRouteHead'; import { profileSamples } from './tourRouteModel'; import { TourRouteProblem, TourRouteWarnings } from './TourRouteNotes'; import TourRouteProfile from './TourRouteProfile'; @@ -40,19 +40,30 @@ export function TourRouteBody({ compare?: ReadonlyArray<{ key: string; samples: readonly DistanceIndexedProfileSample[]; color: string }>; letter?: string; }) { + const { t } = useTranslation(); const samples = useMemo(() => profileSamples(card), [card]); return ( <> - - + + {/* A way drawn straight has neither heights nor the line to say so under: no section at all. */} + {(samples.length >= 2 || card.routed) && ( + + + + )} + {card.stops.length > 0 && ( + + + + )} @@ -63,12 +74,11 @@ export function TourRouteBody({ export default function TourRouteCard({ toolCallId, card }: { toolCallId: string; card: Route }) { const { t } = useTranslation(); - const { density } = useAssistantView(); const route = useTourRouteCard(toolCallId, card); return (
- +
diff --git a/client/src/components/Assistant/cards/tour/TourRouteHead.tsx b/client/src/components/Assistant/cards/tour/TourRouteHead.tsx index 2e7162d97..6fc0d6a91 100644 --- a/client/src/components/Assistant/cards/tour/TourRouteHead.tsx +++ b/client/src/components/Assistant/cards/tour/TourRouteHead.tsx @@ -4,12 +4,14 @@ import { createElement } from 'react'; import { useTranslation } from '../../../../i18n'; import { SoftPill, WhiteBadge } from '../../../Planner/planParts'; +import { fs, PILL } from '../../../shared/DialogShell'; import { Tooltip } from '../../../shared/Tooltip'; import { SacStepChip } from '../../../Tours/hike/SacStepChip'; import { variantPaintCss } from '../../../Tours/planner/legVariantPaint'; import { formatTourDuration } from '../../../Tours/planner/tourDurationInput'; import { tourDayRowIcon } from '../../../Tours/tourDayRowIcon'; -import { CardFacts } from '../parts/CardFacts'; +import CardHeader from '../parts/CardHeader'; +import { CardFields } from '../parts/CardSection'; import RouteSketch from '../parts/RouteSketch'; import { useCardFormat } from '../parts/useCardFormat'; import { factKeysOf, factValue, percentText, type FactKey } from './tourRouteModel'; @@ -89,7 +91,7 @@ export function TourGrade({ card }: { card: TourRouteCard }) { ); } -/** The day a route is planned on, as words: "Day 2, Tue 14 Oct", or the date alone. */ +/** The day a route is planned on, as a white pill on the band: "Day 2, Tue 14 Oct", or the date alone. */ function DayPill({ card }: { card: TourRouteCard }) { const { t } = useTranslation(); const format = useCardFormat(); @@ -98,7 +100,12 @@ function DayPill({ card }: { card: TourRouteCard }) { const date = format.date(schedule.date); const text = schedule.dayNumber !== null ? `${t('assistant.card.tour.day', { day: schedule.dayNumber })}, ${date}` : date; - return ; + return ( + + + ); } /** The route drawn small: a button that shows it on the map. */ @@ -127,35 +134,51 @@ export function TourRouteSketch({ ); } -export default function TourRouteHead({ - card, - sketchHeight, - onShow, -}: { - card: TourRouteCard; - sketchHeight: number; - onShow: () => void; -}) { +/** The route's figures as framed fields, each under its label: distance, climb, descent and time, as known. */ +export function TourRouteFields({ card }: { card: TourRouteCard }) { + const { t } = useTranslation(); + const format = useCardFormat(); + const fields = factKeysOf(card).flatMap((key) => { + const value = factValue(card, key); + if (value === null) return []; + // A field's label is short; how the time was reckoned is the figure badges' tooltip. + const label = t(FACT_LOOK[key].labelKey ?? 'tours.planner.inspector.duration'); + let text: string; + if (key === 'time') text = formatTourDuration(value); + else text = key === 'distance' ? format.distance(value / 1000) : format.elevation(value); + return [{ key, label, value: text }]; + }); + return ; +} + +/** + * The head band of a route card: the route drawn small on a raised tile, what + * kind of tour it is above its name, the label under it, and its grade and + * the day it is planned on as pills on the band. + */ +export default function TourRouteHead({ card, onShow }: { card: TourRouteCard; onShow: () => void }) { const { t } = useTranslation(); const name = routeName(card, t); + const tile = ( + + + + ); return ( -
-
- -
-
-
- - {name} - - -
- {card.label &&

{card.label}

} - - + + {((card.activity === 'hike' && card.grades) || card.schedule) && ( +
+ {card.activity === 'hike' && card.grades && } - -
-
+
+ )} + ); } diff --git a/client/src/components/Assistant/cards/tour/TourRouteInRow.tsx b/client/src/components/Assistant/cards/tour/TourRouteInRow.tsx index 00fc8a9d2..bc3310631 100644 --- a/client/src/components/Assistant/cards/tour/TourRouteInRow.tsx +++ b/client/src/components/Assistant/cards/tour/TourRouteInRow.tsx @@ -10,7 +10,8 @@ import { tourDayRowIcon } from '../../../Tours/tourDayRowIcon'; import type { ChangeItem } from '../../assistantParts'; import { verbLookOf } from '../cardLooks'; import KindTile from '../parts/KindTile'; -import { TourGrade, TourRouteFigures, TourRouteSketch } from './TourRouteHead'; +import WayFigures from './TourFigureLine'; +import { TourGrade, TourRouteSketch } from './TourRouteHead'; import { legVariantOf, previousVariantOf, profileBands, profileSamples } from './tourRouteModel'; import { useTourRouteCard } from './useTourRouteCard'; @@ -37,29 +38,33 @@ export default function TourRouteInRow({ card, item }: { card: TourRouteCard; it const samples = useMemo(() => profileSamples(card), [card]); const previous = previousVariantOf(card); const notPlanned = card.problem?.why === 'not_planned'; + const grades = card.activity === 'hike' ? card.grades : null; return ( -
-
-
- -
-
- - - - {previous && ( - - )} +
+
+ + + +
+ + + + + {grades && grades.highest !== null && } - {notPlanned && ( -

{t('assistant.card.tour.notPlanned')}

+ {previous && ( + )} + {notPlanned &&

{t('assistant.card.tour.notPlanned')}

}
{!notPlanned && samples.length >= 2 && ( diff --git a/client/src/components/Assistant/cards/tour/TourRouteProfile.tsx b/client/src/components/Assistant/cards/tour/TourRouteProfile.tsx index fbe96c254..fa9ee8aee 100644 --- a/client/src/components/Assistant/cards/tour/TourRouteProfile.tsx +++ b/client/src/components/Assistant/cards/tour/TourRouteProfile.tsx @@ -87,7 +87,7 @@ export default function TourRouteProfile({ toolCallId, card, samples, color, foc const bands = useMemo(() => profileBands(card, samples), [card, samples]); if (samples.length < 2) { if (!card.routed) return null; - return

{t('assistant.card.tour.noHeights')}

; + return

{t('assistant.card.tour.noHeights')}

; } const phone = variant === 'fullscreen'; const focusGrade = focus ? gradeAt(grades, focus.distanceMeters) : null; @@ -112,7 +112,7 @@ export default function TourRouteProfile({ toolCallId, card, samples, color, foc }; return ( -
+
+ {glyph} + {stop.stageEnd && } + + ); +} + +function StopRow({ stop, + leg, samples, onFocus, }: { stop: TourRouteStop; + /** The walk from the last stop with a time to this one, read with it. */ + leg: number | null; samples: readonly DistanceIndexedProfileSample[]; onFocus: (focus: RouteProfileFocus | null) => void; }) { @@ -65,44 +85,45 @@ function StopChip({ : null; const stay = stop.stayMinutes ? t('assistant.card.tour.stay', { time: format.minutes(stop.stayMinutes) }) : null; const clock = stop.clock ? format.clock(stop.clock) : null; - const label = [name, clock, off, stay].filter(Boolean).join(', '); - const glyph = createElement(iconOf(stop), { - size: 10, - strokeWidth: 2.2, - 'aria-hidden': true, - className: 'flex-none text-content-faint', - }); - const body = ( - <> - {name} - {clock && {clock}} - {off && {off}} - - ); + const walked = leg !== null ? t('assistant.card.tour.legTime', { time: format.minutes(leg) }) : null; + const label = [name, clock, off, stay, walked].filter(Boolean).join(', '); + const point = () => onFocus(focusOf(stop, samples)); + const under = [off, stay].filter((part): part is string => part !== null); return ( - - - - - {stay && {stay}} - {stop.flag && ( - - )} - +
  • + +
  • ); } @@ -112,38 +133,36 @@ function legMinutes(from: TourRouteStop | undefined, to: TourRouteStop): number return to.minutes - from.minutes; } -/** The line between two rows, with the stretch's walking time on it. */ +/** The walk between two rows, beside the line: read with the row it leads to, so hidden here. */ function Leg({ minutes }: { minutes: number | null }) { const format = useCardFormat(); + if (minutes === null) return ); } -/** One row of the timeline: its dot on the line, then the stop, read after the walk that leads to it. */ -function Row({ end, leg, children }: { end: boolean; leg?: number | null; children: ReactNode }) { +/** The middle stops folded into one row past eight, naming them in its tooltip. */ +function FoldedRow({ stops }: { stops: readonly TourRouteStop[] }) { const { t } = useTranslation(); - const format = useCardFormat(); + const names = stops.map((stop) => stopName(stop, t)).join(', '); return ( - - {leg != null && ( - {t('assistant.card.tour.legTime', { time: format.minutes(leg) })} - )} - - +
  • + + - {children} - + + + {t('assistant.card.tour.stopsMore', { count: stops.length })} + {`: ${names}`} + + +
  • ); } @@ -159,42 +178,30 @@ export default function TourRouteStops({ const { t } = useTranslation(); const { head, folded, tail } = chipStops(card); if (head.length === 0) return null; - const names = folded.map((stop) => stopName(stop, t)).join(', '); // The time is walked from the last stop that has one: a place beside the way has none. let walked: TourRouteStop | undefined; const rows: ReactNode[] = []; const pushStop = (stop: TourRouteStop, key: string) => { const leg = legMinutes(walked, stop); if (rows.length > 0) rows.push(); - rows.push( - - - - ); + rows.push(); if (stop.minutes !== null) walked = stop; }; head.forEach((stop, index) => pushStop(stop, `h-${index}`)); if (folded.length > 0) { rows.push(); - rows.push( - - - - - {t('assistant.card.tour.stopsMore', { count: folded.length })} - {`: ${names}`} - - - - - ); + rows.push(); // The folded stretch's time is not one leg; the next stop measures from the last folded one. walked = [...folded].reverse().find((stop) => stop.minutes !== null) ?? walked; } tail.forEach((stop, index) => pushStop(stop, `t-${index}`)); return ( -
    - {rows} +
    + {/* The line down the timeline, from the first mark to the last, under the marks. */} +
    ); } diff --git a/client/src/components/Assistant/cards/tour/TourWays.tsx b/client/src/components/Assistant/cards/tour/TourWays.tsx index 6c353606c..cd01af628 100644 --- a/client/src/components/Assistant/cards/tour/TourWays.tsx +++ b/client/src/components/Assistant/cards/tour/TourWays.tsx @@ -1,19 +1,128 @@ +import type { TourRouteCard as Route } from '@trek/shared'; +import { Route as RouteIcon } from 'lucide-react'; import { useMemo } from 'react'; import { useTranslation } from '../../../../i18n'; import { chatOf, useAssistantStore } from '../../../../store/assistantStore'; import { useSettingsStore } from '../../../../store/settingsStore'; +import type { DistanceUnit } from '../../../../types'; +import { formatDistance, formatElevation } from '../../../../utils/units'; import { SacStepChip } from '../../../Tours/hike/SacStepChip'; import { variantPaintCss } from '../../../Tours/planner/legVariantPaint'; -import { VariantDelta } from '../../../Tours/planner/LegVariantsCard'; -import { VariantFigures, WayChoice } from '../../../Tours/planner/mapCardParts'; +import { type LegVariant, variantDelta } from '../../../Tours/planner/legVariants'; +import { VariantMark } from '../../../Tours/planner/mapCardParts'; +import { formatTourDuration } from '../../../Tours/planner/tourDurationInput'; import { useAssistantView } from '../../assistantViewContext'; import CardFrame from '../parts/CardFrame'; +import CardHeader from '../parts/CardHeader'; +import { CardSection } from '../parts/CardSection'; +import WayFigures from './TourFigureLine'; import { TourRouteBody } from './TourRouteCard'; import { legVariantOf, profileSamples, type RouteEntry, WAY_KEYS } from './tourRouteModel'; +import { routeName, TOUR_TYPE_WORDS } from './tourRouteWords'; import { useLineHover, useTourRouteCard } from './useTourRouteCard'; -/** The ways of one answer with the chosen one known: its choices, then the chosen way's body. */ +/** A signed difference: a plus for more, a minus sign for less, nothing for none worth printing. */ +function signed(value: number, format: (absolute: number) => string): string | null { + const text = format(Math.abs(value)); + if (Math.abs(value) < 1e-9 || /^0\s/.test(text)) return null; + return `${value > 0 ? '+' : '−'}${text}`; +} + +/** How a way differs from the chosen one, as one faint line: "Compared with way A: −4.3 km −178 m −1 h 33 min". */ +function WayDelta({ + way, + chosen, + letter, + unit, +}: { + way: LegVariant; + chosen: LegVariant; + letter: string; + unit: DistanceUnit; +}) { + const { t } = useTranslation(); + const delta = variantDelta(way, chosen); + const parts = [ + signed(delta.distanceM / 1000, (km) => formatDistance(km, unit)), + delta.gainM === null ? null : signed(delta.gainM, (m) => formatElevation(m, unit)), + delta.minutes === null ? null : signed(delta.minutes, formatTourDuration), + ].filter((part): part is string => part !== null); + if (parts.length === 0) return null; + return ( + + {t('assistant.card.tour.deltaTo', { letter })} + {parts.map((part) => ( + + {part} + + ))} + + ); +} + +/** One way to choose: its letter in the colour it is drawn in, its name and grade, its figures, how it differs. */ +function WayOption({ + entry, + index, + chosen, + chosenWay, + chosenLetter, + unit, + onSelect, + onHover, +}: { + entry: RouteEntry; + index: number; + chosen: boolean; + chosenWay: LegVariant; + chosenLetter: string; + unit: DistanceUnit; + onSelect: () => void; + onHover: (on: boolean) => void; +}) { + const { t } = useTranslation(); + const key = WAY_KEYS[index] ?? 'a'; + const letter = key.toUpperCase(); + const way = legVariantOf(entry.card, key); + const grades = entry.card.grades; + const name = entry.card.label ?? t('tours.variants.option', { letter }); + return ( + + ); +} + +/** The ways of one answer with the chosen one known: the band, the choices, then the chosen way's body. */ function WaysCard({ entries, chosen, @@ -44,57 +153,49 @@ function WaysCard({ [entries, chosenIndex] ); - const current = legVariantOf(chosen.card, chosenKey); + const chosenWay = legVariantOf(chosen.card, chosenKey); // Side by side where the window is roomy; on the phone the ways stay rows, so a finger scrubs the profile freely. let columns = ''; if (density === 'roomy' && variant !== 'fullscreen') columns = entries.length >= 3 ? 'grid-cols-3' : 'grid-cols-2'; const title = t('assistant.card.tour.ways', { count: entries.length }); + const card: Route = chosen.card; return ( -
    +
    -

    {title}

    -
    - {entries.map((entry, index) => { - const key = WAY_KEYS[index] ?? 'a'; - const letter = key.toUpperCase(); - const way = legVariantOf(entry.card, key); - const grades = entry.card.grades; - return ( - + +
    + {entries.map((entry, index) => ( + - {index !== chosenIndex && ( - - )} - {grades && = 0.5} />} - - } + chosenWay={chosenWay} + chosenLetter={chosenKey.toUpperCase()} + unit={unit} onSelect={() => pick(tripId, blockKey, entry.toolCallId)} onHover={(on) => hover(entry.toolCallId, on)} - > - - - ); - })} + /> + ))} +
    +
    +
    +
    -
    ); @@ -102,12 +203,12 @@ function WaysCard({ /** * Two or three ways of one route an answer proposed, as the planner offers a - * section's ways: each a choice with its letter in the colour it is drawn in, - * its own words, how it differs from the chosen one and its hardest grade, - * its figures below. One profile holds them all, the chosen way filled and - * the others thin on the same axes; under it the chosen way's stops, day and - * warnings, and "Plan way B". A choice is kept per answer, and pointing at a - * way lights its line on the map. + * section's ways: a band naming the route, each way a choice with its letter + * in the colour it is drawn in, its name and hardest grade, its figures and + * how it differs from the chosen one; one profile holds them all, the chosen + * way filled and the others thin on the same axes; under it the chosen way's + * figures, stops, day and warnings, and "Plan way B". A choice is kept per + * answer, and pointing at a way lights its line on the map. */ export default function TourWays({ entries }: { entries: readonly RouteEntry[] }) { const { tripId } = useAssistantView(); diff --git a/client/src/components/Assistant/cards/vacay/VacayAnswerBlock.tsx b/client/src/components/Assistant/cards/vacay/VacayAnswerBlock.tsx index 9fe5aca3b..36f5e1605 100644 --- a/client/src/components/Assistant/cards/vacay/VacayAnswerBlock.tsx +++ b/client/src/components/Assistant/cards/vacay/VacayAnswerBlock.tsx @@ -1,10 +1,14 @@ import type { CSSProperties } from 'react'; +import { Palmtree } from 'lucide-react'; + import { useTranslation } from '../../../../i18n'; import { safeHexColor } from '../../../../utils/safeColor'; import type { CardEntry } from '../cardTypes'; import CardFrame from '../parts/CardFrame'; +import CardHeader from '../parts/CardHeader'; import { CardOpenButton } from '../parts/CardOpen'; +import { CardFoot } from '../parts/CardSection'; import { useViewerId } from '../parts/useViewerId'; import VacayBalance from './VacayBalance'; import { balanceLines, mergeVacayCards, type VacayView } from './vacayCardModel'; @@ -26,7 +30,6 @@ const SQUARE = 'size-2 flex-none rounded-sm'; const COMPANY = 'size-2 flex-none rounded-sm bg-warning-soft ring-1 ring-inset ring-warning'; const TRIP = 'size-1.5 flex-none rounded-full bg-info'; const OTHER = 'mt-1.5 text-caption text-content-muted'; -const FOOT = 'mt-1 flex justify-end'; interface LegendItem { key: string; @@ -79,13 +82,14 @@ export default function VacayAnswerBlock({ cards }: { cards: readonly CardEntry[ const first = own[0] ?? null; return ( + {view.months.length > 0 && ''} />} {view.otherDays > 0 &&

    {t('assistant.card.vacay.otherDays', { count: view.otherDays })}

    } -
    + -
    +
    ); } diff --git a/shared/src/i18n/ar/assistantTour.ts b/shared/src/i18n/ar/assistantTour.ts index bc9d4f7f7..dadc78978 100644 --- a/shared/src/i18n/ar/assistantTour.ts +++ b/shared/src/i18n/ar/assistantTour.ts @@ -26,6 +26,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.ways.two': 'طريقان', 'assistant.card.tour.ways.few': '{count} طرق', 'assistant.card.tour.ways.many': '{count} طريقًا', + 'assistant.card.tour.waysPick': 'اختر طريقًا', 'assistant.card.tour.deltaTo': 'مقارنةً بالطريق {letter}', 'assistant.card.tour.deltaBefore': 'مقارنةً بالطريق الحالي', 'assistant.card.tour.day': 'اليوم {day}', diff --git a/shared/src/i18n/az/assistantTour.ts b/shared/src/i18n/az/assistantTour.ts index 263a93695..57d7003fa 100644 --- a/shared/src/i18n/az/assistantTour.ts +++ b/shared/src/i18n/az/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Turlar', 'assistant.card.tour.ways': '{count} yol', 'assistant.card.tour.ways.one': '{count} yol', + 'assistant.card.tour.waysPick': 'Yol seçin', 'assistant.card.tour.deltaTo': '{letter} yolu ilə müqayisədə', 'assistant.card.tour.deltaBefore': 'Hazırkı yolla müqayisədə', 'assistant.card.tour.day': 'Gün {day}', diff --git a/shared/src/i18n/br/assistantTour.ts b/shared/src/i18n/br/assistantTour.ts index 925d1785c..9feda65a5 100644 --- a/shared/src/i18n/br/assistantTour.ts +++ b/shared/src/i18n/br/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Passeios', 'assistant.card.tour.ways': '{count} caminhos', 'assistant.card.tour.ways.one': '{count} caminho', + 'assistant.card.tour.waysPick': 'Escolha um caminho', 'assistant.card.tour.deltaTo': 'Comparado com o caminho {letter}', 'assistant.card.tour.deltaBefore': 'Comparado com o caminho atual', 'assistant.card.tour.day': 'Dia {day}', diff --git a/shared/src/i18n/ca/assistantTour.ts b/shared/src/i18n/ca/assistantTour.ts index 6b1c5ccfc..5aca9773b 100644 --- a/shared/src/i18n/ca/assistantTour.ts +++ b/shared/src/i18n/ca/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Excursions', 'assistant.card.tour.ways': '{count} camins', 'assistant.card.tour.ways.one': '{count} camí', + 'assistant.card.tour.waysPick': 'Tria un camí', 'assistant.card.tour.deltaTo': 'Comparat amb el camí {letter}', 'assistant.card.tour.deltaBefore': 'Comparat amb el camí actual', 'assistant.card.tour.day': 'Dia {day}', diff --git a/shared/src/i18n/cs/assistantTour.ts b/shared/src/i18n/cs/assistantTour.ts index 1f1e76b56..079f87d36 100644 --- a/shared/src/i18n/cs/assistantTour.ts +++ b/shared/src/i18n/cs/assistantTour.ts @@ -23,6 +23,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.ways': '{count} cest', 'assistant.card.tour.ways.one': '{count} cesta', 'assistant.card.tour.ways.few': '{count} cesty', + 'assistant.card.tour.waysPick': 'Vyberte cestu', 'assistant.card.tour.deltaTo': 'Ve srovnání s cestou {letter}', 'assistant.card.tour.deltaBefore': 'Ve srovnání se stávající cestou', 'assistant.card.tour.day': 'Den {day}', diff --git a/shared/src/i18n/de/assistantTour.ts b/shared/src/i18n/de/assistantTour.ts index 917a4b82a..17cf77f57 100644 --- a/shared/src/i18n/de/assistantTour.ts +++ b/shared/src/i18n/de/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Touren', 'assistant.card.tour.ways': '{count} Wege', 'assistant.card.tour.ways.one': '{count} Weg', + 'assistant.card.tour.waysPick': 'Weg wählen', 'assistant.card.tour.deltaTo': 'Verglichen mit Weg {letter}', 'assistant.card.tour.deltaBefore': 'Verglichen mit dem bisherigen Weg', 'assistant.card.tour.day': 'Tag {day}', diff --git a/shared/src/i18n/en/assistantTour.ts b/shared/src/i18n/en/assistantTour.ts index 3d6c44c0e..9b5ecbdf1 100644 --- a/shared/src/i18n/en/assistantTour.ts +++ b/shared/src/i18n/en/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Tours', 'assistant.card.tour.ways': '{count} ways', 'assistant.card.tour.ways.one': '{count} way', + 'assistant.card.tour.waysPick': 'Pick a way', 'assistant.card.tour.deltaTo': 'Compared with way {letter}', 'assistant.card.tour.deltaBefore': 'Compared with the way it has now', 'assistant.card.tour.day': 'Day {day}', diff --git a/shared/src/i18n/es/assistantTour.ts b/shared/src/i18n/es/assistantTour.ts index 06093dd59..e308a35ba 100644 --- a/shared/src/i18n/es/assistantTour.ts +++ b/shared/src/i18n/es/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Excursiones', 'assistant.card.tour.ways': '{count} caminos', 'assistant.card.tour.ways.one': '{count} camino', + 'assistant.card.tour.waysPick': 'Elige un camino', 'assistant.card.tour.deltaTo': 'Comparado con el camino {letter}', 'assistant.card.tour.deltaBefore': 'Comparado con el camino actual', 'assistant.card.tour.day': 'Día {day}', diff --git a/shared/src/i18n/et/assistantTour.ts b/shared/src/i18n/et/assistantTour.ts index 613e0fd0b..aa5a12a28 100644 --- a/shared/src/i18n/et/assistantTour.ts +++ b/shared/src/i18n/et/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Retked', 'assistant.card.tour.ways': '{count} teed', 'assistant.card.tour.ways.one': '{count} tee', + 'assistant.card.tour.waysPick': 'Vali tee', 'assistant.card.tour.deltaTo': 'Võrreldes teega {letter}', 'assistant.card.tour.deltaBefore': 'Võrreldes praeguse teega', 'assistant.card.tour.day': 'Päev {day}', diff --git a/shared/src/i18n/fr/assistantTour.ts b/shared/src/i18n/fr/assistantTour.ts index 89b640866..611651524 100644 --- a/shared/src/i18n/fr/assistantTour.ts +++ b/shared/src/i18n/fr/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Sorties', 'assistant.card.tour.ways': '{count} chemins', 'assistant.card.tour.ways.one': '{count} chemin', + 'assistant.card.tour.waysPick': 'Choisir un itinéraire', 'assistant.card.tour.deltaTo': 'Comparé au chemin {letter}', 'assistant.card.tour.deltaBefore': 'Comparé au chemin actuel', 'assistant.card.tour.day': 'Jour {day}', diff --git a/shared/src/i18n/gr/assistantTour.ts b/shared/src/i18n/gr/assistantTour.ts index 136724f2e..d11370c88 100644 --- a/shared/src/i18n/gr/assistantTour.ts +++ b/shared/src/i18n/gr/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Εκδρομές', 'assistant.card.tour.ways': '{count} διαδρομές', 'assistant.card.tour.ways.one': '{count} διαδρομή', + 'assistant.card.tour.waysPick': 'Επιλέξτε διαδρομή', 'assistant.card.tour.deltaTo': 'Σε σύγκριση με τη διαδρομή {letter}', 'assistant.card.tour.deltaBefore': 'Σε σύγκριση με την τωρινή διαδρομή', 'assistant.card.tour.day': 'Ημέρα {day}', diff --git a/shared/src/i18n/hu/assistantTour.ts b/shared/src/i18n/hu/assistantTour.ts index f0609fe7b..d4ebefa7c 100644 --- a/shared/src/i18n/hu/assistantTour.ts +++ b/shared/src/i18n/hu/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Túrák', 'assistant.card.tour.ways': '{count} út', 'assistant.card.tour.ways.one': '{count} út', + 'assistant.card.tour.waysPick': 'Válassz utat', 'assistant.card.tour.deltaTo': 'A(z) {letter} úthoz képest', 'assistant.card.tour.deltaBefore': 'A jelenlegi úthoz képest', 'assistant.card.tour.day': '{day}. nap', diff --git a/shared/src/i18n/id/assistantTour.ts b/shared/src/i18n/id/assistantTour.ts index 259e41433..02394a50e 100644 --- a/shared/src/i18n/id/assistantTour.ts +++ b/shared/src/i18n/id/assistantTour.ts @@ -21,6 +21,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.peekClose': 'Tutup rute', 'assistant.card.tour.list': 'Daftar tur', 'assistant.card.tour.ways': '{count} jalan', + 'assistant.card.tour.waysPick': 'Pilih jalur', 'assistant.card.tour.deltaTo': 'Dibandingkan dengan jalan {letter}', 'assistant.card.tour.deltaBefore': 'Dibandingkan dengan jalan saat ini', 'assistant.card.tour.day': 'Hari {day}', diff --git a/shared/src/i18n/it/assistantTour.ts b/shared/src/i18n/it/assistantTour.ts index dfbeff76f..6e7c07fc2 100644 --- a/shared/src/i18n/it/assistantTour.ts +++ b/shared/src/i18n/it/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Escursioni', 'assistant.card.tour.ways': '{count} percorsi', 'assistant.card.tour.ways.one': '{count} percorso', + 'assistant.card.tour.waysPick': 'Scegli un percorso', 'assistant.card.tour.deltaTo': 'Rispetto al percorso {letter}', 'assistant.card.tour.deltaBefore': 'Rispetto al percorso attuale', 'assistant.card.tour.day': 'Giorno {day}', diff --git a/shared/src/i18n/ja/assistantTour.ts b/shared/src/i18n/ja/assistantTour.ts index 275a37909..ef378c595 100644 --- a/shared/src/i18n/ja/assistantTour.ts +++ b/shared/src/i18n/ja/assistantTour.ts @@ -21,6 +21,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.peekClose': 'ルートを閉じる', 'assistant.card.tour.list': 'ツアー一覧', 'assistant.card.tour.ways': '{count}本の道', + 'assistant.card.tour.waysPick': 'ルートを選択', 'assistant.card.tour.deltaTo': '道{letter}との比較', 'assistant.card.tour.deltaBefore': '今の道との比較', 'assistant.card.tour.day': '{day}日目', diff --git a/shared/src/i18n/ko/assistantTour.ts b/shared/src/i18n/ko/assistantTour.ts index 9c8a49fc1..ae1867c06 100644 --- a/shared/src/i18n/ko/assistantTour.ts +++ b/shared/src/i18n/ko/assistantTour.ts @@ -21,6 +21,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.peekClose': '경로 닫기', 'assistant.card.tour.list': '투어 목록', 'assistant.card.tour.ways': '길 {count}개', + 'assistant.card.tour.waysPick': '경로 선택', 'assistant.card.tour.deltaTo': '길 {letter}과 비교', 'assistant.card.tour.deltaBefore': '지금 길과 비교', 'assistant.card.tour.day': '{day}일차', diff --git a/shared/src/i18n/nl/assistantTour.ts b/shared/src/i18n/nl/assistantTour.ts index 1de438533..32469644c 100644 --- a/shared/src/i18n/nl/assistantTour.ts +++ b/shared/src/i18n/nl/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Tochten', 'assistant.card.tour.ways': '{count} wegen', 'assistant.card.tour.ways.one': '{count} weg', + 'assistant.card.tour.waysPick': 'Kies een route', 'assistant.card.tour.deltaTo': 'Vergeleken met weg {letter}', 'assistant.card.tour.deltaBefore': 'Vergeleken met de huidige weg', 'assistant.card.tour.day': 'Dag {day}', diff --git a/shared/src/i18n/pl/assistantTour.ts b/shared/src/i18n/pl/assistantTour.ts index 6c0ad1cde..fca0c6660 100644 --- a/shared/src/i18n/pl/assistantTour.ts +++ b/shared/src/i18n/pl/assistantTour.ts @@ -24,6 +24,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.ways.one': '{count} droga', 'assistant.card.tour.ways.few': '{count} drogi', 'assistant.card.tour.ways.many': '{count} dróg', + 'assistant.card.tour.waysPick': 'Wybierz drogę', 'assistant.card.tour.deltaTo': 'W porównaniu z drogą {letter}', 'assistant.card.tour.deltaBefore': 'W porównaniu z obecną drogą', 'assistant.card.tour.day': 'Dzień {day}', diff --git a/shared/src/i18n/ru/assistantTour.ts b/shared/src/i18n/ru/assistantTour.ts index d44db152f..b22417d5b 100644 --- a/shared/src/i18n/ru/assistantTour.ts +++ b/shared/src/i18n/ru/assistantTour.ts @@ -24,6 +24,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.ways.one': '{count} путь', 'assistant.card.tour.ways.few': '{count} пути', 'assistant.card.tour.ways.many': '{count} путей', + 'assistant.card.tour.waysPick': 'Выберите путь', 'assistant.card.tour.deltaTo': 'По сравнению с путём {letter}', 'assistant.card.tour.deltaBefore': 'По сравнению с нынешним путём', 'assistant.card.tour.day': 'День {day}', diff --git a/shared/src/i18n/sk/assistantTour.ts b/shared/src/i18n/sk/assistantTour.ts index eeb059a00..7f5f0c370 100644 --- a/shared/src/i18n/sk/assistantTour.ts +++ b/shared/src/i18n/sk/assistantTour.ts @@ -23,6 +23,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.ways': '{count} ciest', 'assistant.card.tour.ways.one': '{count} cesta', 'assistant.card.tour.ways.few': '{count} cesty', + 'assistant.card.tour.waysPick': 'Vyberte cestu', 'assistant.card.tour.deltaTo': 'V porovnaní s cestou {letter}', 'assistant.card.tour.deltaBefore': 'V porovnaní so súčasnou cestou', 'assistant.card.tour.day': 'Deň {day}', diff --git a/shared/src/i18n/sv/assistantTour.ts b/shared/src/i18n/sv/assistantTour.ts index ea45a400a..1f0eb126d 100644 --- a/shared/src/i18n/sv/assistantTour.ts +++ b/shared/src/i18n/sv/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Turer', 'assistant.card.tour.ways': '{count} vägar', 'assistant.card.tour.ways.one': '{count} väg', + 'assistant.card.tour.waysPick': 'Välj en väg', 'assistant.card.tour.deltaTo': 'Jämfört med väg {letter}', 'assistant.card.tour.deltaBefore': 'Jämfört med den nuvarande vägen', 'assistant.card.tour.day': 'Dag {day}', diff --git a/shared/src/i18n/th/assistantTour.ts b/shared/src/i18n/th/assistantTour.ts index 1b0f8bec9..04e4c1609 100644 --- a/shared/src/i18n/th/assistantTour.ts +++ b/shared/src/i18n/th/assistantTour.ts @@ -21,6 +21,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.peekClose': 'ปิดเส้นทาง', 'assistant.card.tour.list': 'รายการทัวร์', 'assistant.card.tour.ways': '{count} เส้นทาง', + 'assistant.card.tour.waysPick': 'เลือกเส้นทาง', 'assistant.card.tour.deltaTo': 'เทียบกับเส้นทาง {letter}', 'assistant.card.tour.deltaBefore': 'เทียบกับเส้นทางปัจจุบัน', 'assistant.card.tour.day': 'วันที่ {day}', diff --git a/shared/src/i18n/tr/assistantTour.ts b/shared/src/i18n/tr/assistantTour.ts index 6c058e678..3e2cc7932 100644 --- a/shared/src/i18n/tr/assistantTour.ts +++ b/shared/src/i18n/tr/assistantTour.ts @@ -22,6 +22,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.list': 'Turlar', 'assistant.card.tour.ways': '{count} yol', 'assistant.card.tour.ways.one': '{count} yol', + 'assistant.card.tour.waysPick': 'Bir yol seçin', 'assistant.card.tour.deltaTo': '{letter} yoluyla karşılaştırıldığında', 'assistant.card.tour.deltaBefore': 'Şimdiki yolla karşılaştırıldığında', 'assistant.card.tour.day': '{day}. gün', diff --git a/shared/src/i18n/uk/assistantTour.ts b/shared/src/i18n/uk/assistantTour.ts index e7bfff54b..d1d77eb36 100644 --- a/shared/src/i18n/uk/assistantTour.ts +++ b/shared/src/i18n/uk/assistantTour.ts @@ -24,6 +24,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.ways.one': '{count} шлях', 'assistant.card.tour.ways.few': '{count} шляхи', 'assistant.card.tour.ways.many': '{count} шляхів', + 'assistant.card.tour.waysPick': 'Оберіть шлях', 'assistant.card.tour.deltaTo': 'Порівняно зі шляхом {letter}', 'assistant.card.tour.deltaBefore': 'Порівняно з нинішнім шляхом', 'assistant.card.tour.day': 'День {day}', diff --git a/shared/src/i18n/vi/assistantTour.ts b/shared/src/i18n/vi/assistantTour.ts index 5ce8c6f7f..86f1e5f92 100644 --- a/shared/src/i18n/vi/assistantTour.ts +++ b/shared/src/i18n/vi/assistantTour.ts @@ -21,6 +21,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.peekClose': 'Đóng lộ trình', 'assistant.card.tour.list': 'Chuyến tham quan', 'assistant.card.tour.ways': '{count} lối đi', + 'assistant.card.tour.waysPick': 'Chọn một lối đi', 'assistant.card.tour.deltaTo': 'So với lối đi {letter}', 'assistant.card.tour.deltaBefore': 'So với lối đi hiện tại', 'assistant.card.tour.day': 'Ngày {day}', diff --git a/shared/src/i18n/zh-TW/assistantTour.ts b/shared/src/i18n/zh-TW/assistantTour.ts index 1a184e813..c33251840 100644 --- a/shared/src/i18n/zh-TW/assistantTour.ts +++ b/shared/src/i18n/zh-TW/assistantTour.ts @@ -21,6 +21,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.peekClose': '關閉路線', 'assistant.card.tour.list': '路線清單', 'assistant.card.tour.ways': '{count}條道路', + 'assistant.card.tour.waysPick': '選擇路線', 'assistant.card.tour.deltaTo': '與道路{letter}相比', 'assistant.card.tour.deltaBefore': '與現有道路相比', 'assistant.card.tour.day': '第{day}天', diff --git a/shared/src/i18n/zh/assistantTour.ts b/shared/src/i18n/zh/assistantTour.ts index 7ef4c1ea7..c5b923446 100644 --- a/shared/src/i18n/zh/assistantTour.ts +++ b/shared/src/i18n/zh/assistantTour.ts @@ -21,6 +21,7 @@ const assistantTour: TranslationStrings = { 'assistant.card.tour.peekClose': '关闭路线', 'assistant.card.tour.list': '路线列表', 'assistant.card.tour.ways': '{count}条道路', + 'assistant.card.tour.waysPick': '选择路线', 'assistant.card.tour.deltaTo': '与道路{letter}相比', 'assistant.card.tour.deltaBefore': '与现有道路相比', 'assistant.card.tour.day': '第{day}天',