diff --git a/web/src/components/packets/ErrorPacket.tsx b/web/src/components/packets/ErrorPacket.tsx index 14737c0..1556870 100644 --- a/web/src/components/packets/ErrorPacket.tsx +++ b/web/src/components/packets/ErrorPacket.tsx @@ -29,8 +29,8 @@ export const ErrorPacket: React.FC = ({ packet }) => { {data.binaryData && (
-
Raw Data
-
+
Raw Data
+
{data.binaryData}
diff --git a/web/src/components/packets/KeyValuePair.tsx b/web/src/components/packets/KeyValuePair.tsx index 70b9a15..15eec85 100644 --- a/web/src/components/packets/KeyValuePair.tsx +++ b/web/src/components/packets/KeyValuePair.tsx @@ -13,10 +13,10 @@ export const KeyValuePair: React.FC = ({ }) => { return (
-
+
{label}
-
+
{value || "—"}
@@ -29,7 +29,7 @@ interface KeyValueGridProps { export const KeyValueGrid: React.FC = ({ children }) => { return ( -
+
{children}
); diff --git a/web/src/components/packets/PacketCard.tsx b/web/src/components/packets/PacketCard.tsx index 646366d..2a55d6a 100644 --- a/web/src/components/packets/PacketCard.tsx +++ b/web/src/components/packets/PacketCard.tsx @@ -53,7 +53,7 @@ export const PacketCard: React.FC = ({
{/* Card Content */} -
+
{children}
diff --git a/web/src/components/packets/TextMessagePacket.tsx b/web/src/components/packets/TextMessagePacket.tsx index 8efeeec..535fef4 100644 --- a/web/src/components/packets/TextMessagePacket.tsx +++ b/web/src/components/packets/TextMessagePacket.tsx @@ -18,7 +18,7 @@ export const TextMessagePacket: React.FC = ({ packet }) label="Text Message" backgroundColor="bg-blue-950/5" > -
+
{data.textMessage || "Empty message"}
diff --git a/web/src/components/packets/WaypointPacket.tsx b/web/src/components/packets/WaypointPacket.tsx index 3bcd1e6..42cc326 100644 --- a/web/src/components/packets/WaypointPacket.tsx +++ b/web/src/components/packets/WaypointPacket.tsx @@ -16,21 +16,24 @@ export const WaypointPacket: React.FC = ({ packet }) => { if (!waypoint) { return null; } - + // Convert coordinates const latitude = waypoint.latitudeI ? waypoint.latitudeI * 1e-7 : undefined; - const longitude = waypoint.longitudeI ? waypoint.longitudeI * 1e-7 : undefined; - - // Format expire time if available - const expireTime = waypoint.expire && waypoint.expire > 0 - ? new Date(waypoint.expire * 1000).toLocaleString([], { - month: 'short', - day: 'numeric', - hour: '2-digit', - minute: '2-digit' - }) + const longitude = waypoint.longitudeI + ? waypoint.longitudeI * 1e-7 : undefined; - + + // Format expire time if available + const expireTime = + waypoint.expire && waypoint.expire > 0 + ? new Date(waypoint.expire * 1000).toLocaleString([], { + month: "short", + day: "numeric", + hour: "2-digit", + minute: "2-digit", + }) + : undefined; + return ( = ({ packet }) => { label="Waypoint" backgroundColor="bg-violet-950/5" > -
- {waypoint.name && ( - - )} - -
-
- - {waypoint.id !== undefined && ( - - )} - {latitude !== undefined && ( - - )} - {longitude !== undefined && ( - - )} - {expireTime && ( - - )} - {waypoint.lockedTo !== undefined && waypoint.lockedTo > 0 && ( - - )} - - - {waypoint.description && ( -
-
Description
-
{waypoint.description}
-
+
+
+ {waypoint.name && ( +
+
Waypoint Name
+
{waypoint.name}
+
+ )} + + {latitude !== undefined && ( + )} -
- - {latitude !== undefined && longitude !== undefined && ( -
- + )} + {waypoint.id !== undefined && ( + + )} + {expireTime && } + {waypoint.lockedTo !== undefined && waypoint.lockedTo > 0 && ( + + )} + + + {waypoint.description && ( +
+
Description
+
{waypoint.description}
)}
+ + {latitude !== undefined && longitude !== undefined && ( +
+ +
+ )}
); -}; \ No newline at end of file +};