diff --git a/apps/web/src/components/StatusBar.tsx b/apps/web/src/components/StatusBar.tsx
index b4563fe..53b839f 100644
--- a/apps/web/src/components/StatusBar.tsx
+++ b/apps/web/src/components/StatusBar.tsx
@@ -18,6 +18,13 @@ type StatusBarProps = {
} | null;
};
+type StatusItemData = {
+ icon?: ReactNode;
+ label: string;
+ value: string;
+ speed?: boolean;
+};
+
export function StatusBar({
gps,
forecast,
@@ -39,7 +46,7 @@ export function StatusBar({
? "Position aktiv"
: `±${gps.accuracyM} m`
: gpsStatusLabel(gps.status);
- const speedValue = gps.speedKn === null ? "-- kn" : `${gps.speedKn.toFixed(1)} kn`;
+ const speedValue = formatGpsSpeed(gps.speedKn);
const tideValue = tide?.nextHigh
? `HW ${new Date(tide.nextHigh.time).toLocaleTimeString("de-DE", {
hour: "2-digit",
@@ -48,7 +55,7 @@ export function StatusBar({
: "Keine Daten";
const conditionsValue = formatConditions(forecast);
- const items =
+ const items: StatusItemData[] =
resolvedMode === "anchor"
? [
{
@@ -95,9 +102,9 @@ export function StatusBar({
value: `${routeWarningCount} offen`
}
: {
- icon: ,
- label: "SOG",
- value: speedValue
+ icon: ,
+ label: "GPS",
+ value: gpsValue
}
]
: resolvedMode === "route"
@@ -115,17 +122,11 @@ export function StatusBar({
label: "GPS",
value: gpsValue
},
- gps.position
- ? {
- icon: ,
- label: "SOG",
- value: speedValue
- }
- : {
- icon: ,
- label: "Tide",
- value: tideValue
- }
+ {
+ icon: ,
+ label: "Tide",
+ value: tideValue
+ }
]
: [
{
@@ -144,23 +145,44 @@ export function StatusBar({
value: tideValue
}
];
+ const statusItems: StatusItemData[] = [
+ ...items,
+ {
+ icon: ,
+ label: "GPS-Geschwindigkeit",
+ value: speedValue,
+ speed: true
+ }
+ ];
return (
-