improve display of in-progress events in explore tracking details

This commit is contained in:
Josh Hawkins 2025-11-17 18:20:47 -06:00
parent 01d52a8bf6
commit 0dbf648b3d

View File

@ -177,8 +177,9 @@ export function TrackingDetails({
}) })
: ""; : "";
const formattedEnd = config const formattedEnd =
? formatUnixTimestampToDateTime(event.end_time ?? 0, { config && event.end_time != null
? formatUnixTimestampToDateTime(event.end_time, {
timezone: config.ui.timezone, timezone: config.ui.timezone,
date_format: date_format:
config.ui.time_format == "24hour" config.ui.time_format == "24hour"
@ -525,9 +526,16 @@ export function TrackingDetails({
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span className="capitalize">{label}</span> <span className="capitalize">{label}</span>
<span className="md:text-md text-xs text-secondary-foreground"> <div className="md:text-md flex items-center text-xs text-secondary-foreground">
{formattedStart ?? ""} - {formattedEnd ?? ""} {formattedStart ?? ""}
</span> {event.end_time != null ? (
<> - {formattedEnd}</>
) : (
<div className="inline-block">
<ActivityIndicator className="ml-3 size-4" />
</div>
)}
</div>
{event.data?.recognized_license_plate && ( {event.data?.recognized_license_plate && (
<> <>
<span className="text-secondary-foreground">·</span> <span className="text-secondary-foreground">·</span>