mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 21:11:14 +00:00
164a3633ac
Ski becomes "Ski & winter", a type the planner plans with six disciplines (alpine, snowboard, cross-country, ski touring, snowshoeing, winter hiking), nothing preselected; saving needs a discipline, and a technique for cross-country. Every leg is drawn straight between the points through planner/skiRouting.ts, the one place the piste router will plug in, with its heights from the elevation source and no ski time worked out. The hike's winter label goes entirely: its migration, column, field, marks, GPX rule, MCP field and strings. A hike is summer only; a ski tour with the snowshoe discipline exports as snowshoeing. The unreleased ski migration takes the six disciplines and the collection migration loses the winter column. The pistes are offered for a ski tour, shown until switched off, and with no tour open, never for a hike. Export, copy, collections, stages (untimed), actual tracks, the atlas, list and day marks (one glyph per discipline), 3D, planning over a ski import and list_tours/get_tour_plan know the planned ski tour.
37 lines
1022 B
TypeScript
37 lines
1022 B
TypeScript
import type { LucideIcon } from 'lucide-react';
|
|
import { Tooltip } from '../shared/Tooltip';
|
|
|
|
/**
|
|
* A frosted badge on the top corner of a tour's round tile, carrying one
|
|
* icon: a ski tour's discipline (SKI-02).
|
|
* Its tooltip and accessible name say what the icon stands for.
|
|
*/
|
|
export function TourCornerMark({
|
|
icon: Icon,
|
|
label,
|
|
size = 15,
|
|
testId,
|
|
}: {
|
|
icon: LucideIcon;
|
|
label: string;
|
|
/** The badge's diameter in pixels, about half the tile's. */
|
|
size?: number;
|
|
testId: string;
|
|
}) {
|
|
return (
|
|
<span className="absolute -end-1 -top-1 flex">
|
|
<Tooltip label={label}>
|
|
<span
|
|
data-testid={testId}
|
|
role="img"
|
|
aria-label={label}
|
|
className="grid place-items-center rounded-full bg-surface-card text-info shadow-sm ring-1 ring-inset ring-edge-faint"
|
|
style={{ width: size, height: size }}
|
|
>
|
|
<Icon size={Math.round(size * 0.64)} strokeWidth={2.4} aria-hidden="true" />
|
|
</span>
|
|
</Tooltip>
|
|
</span>
|
|
);
|
|
}
|