feat: BSH-Pegelauswahl und Fix für Eintragstag beim Gezeiten-Abruf

Bei fehlgeschlagenem Auto-Abruf nächste BSH-Stationen anbieten; Reisetag
korrekt aus dem Eintrag parsen und Vergangenheitshinweis anzeigen.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-12 11:16:01 +02:00
co-authored by Cursor
parent 7d6c908f65
commit 4f519e34b4
18 changed files with 807 additions and 75 deletions
@@ -0,0 +1,57 @@
import type { TideStation } from '../services/tides.js'
type TideStationPickerModalProps = {
title: string
hint: string
cancelLabel: string
stations: TideStation[]
onSelect: (station: TideStation) => void
onCancel: () => void
}
export function TideStationPickerModal({
title,
hint,
cancelLabel,
stations,
onSelect,
onCancel
}: TideStationPickerModalProps) {
return (
<div
className="live-log-modal-backdrop"
onClick={(e) => {
if (e.target === e.currentTarget) onCancel()
}}
>
<div className="live-log-modal tide-station-picker" onClick={(e) => e.stopPropagation()}>
<h3>{title}</h3>
<p className="live-log-modal-hint" role="note">
{hint}
</p>
<ul className="tide-station-picker__list">
{stations.map((station) => (
<li key={station.id}>
<button
type="button"
className="tide-station-picker__option"
onClick={() => onSelect(station)}
>
<span className="tide-station-picker__name">{station.name}</span>
<span className="tide-station-picker__meta">
{station.distanceKm} km
{station.area ? ` · ${station.area}` : ''}
</span>
</button>
</li>
))}
</ul>
<div className="live-log-modal-actions">
<button type="button" className="btn secondary" onClick={onCancel}>
{cancelLabel}
</button>
</div>
</div>
</div>
)
}