* Allow deleting failed in progress exports

* Fix comparison and preview retrieval

* Fix stretching of event cards

* Reset edit state when group changes

* Allow specifying group
This commit is contained in:
Nicolas Mowen
2024-06-04 09:10:19 -06:00
committed by GitHub
parent 7917bf55ff
commit 2875e84cb5
8 changed files with 146 additions and 85 deletions

View File

@@ -668,27 +668,32 @@ function Timeline({
<Skeleton className="size-full" />
)
) : (
<div
className={`grid h-full grid-cols-1 gap-4 overflow-auto bg-secondary p-4 ${isDesktop ? "" : "sm:grid-cols-2"}`}
>
{mainCameraReviewItems.map((review) => {
if (review.severity == "significant_motion") {
return;
}
<div className="h-full overflow-auto bg-secondary">
<div
className={cn(
"grid h-auto grid-cols-1 gap-4 overflow-auto p-4",
isMobile && "sm:grid-cols-2",
)}
>
{mainCameraReviewItems.map((review) => {
if (review.severity == "significant_motion") {
return;
}
return (
<ReviewCard
key={review.id}
event={review}
currentTime={currentTime}
onClick={() => {
setScrubbing(true);
setCurrentTime(review.start_time - REVIEW_PADDING);
setScrubbing(false);
}}
/>
);
})}
return (
<ReviewCard
key={review.id}
event={review}
currentTime={currentTime}
onClick={() => {
setScrubbing(true);
setCurrentTime(review.start_time - REVIEW_PADDING);
setScrubbing(false);
}}
/>
);
})}
</div>
</div>
)}
</div>

View File

@@ -91,8 +91,16 @@ export default function DraggableGridLayout({
);
}, [config]);
// editing
const [editGroup, setEditGroup] = useState(false);
useEffect(() => {
setEditGroup(false);
}, [cameraGroup]);
// camera state
const [currentCameras, setCurrentCameras] = useState<CameraConfig[]>();
const [currentIncludeBirdseye, setCurrentIncludeBirdseye] =
useState<boolean>();

View File

@@ -224,7 +224,13 @@ export default function LiveDashboardView({
<TooltipProvider>
<div className="flex items-center gap-2 px-1">
{events.map((event) => {
return <AnimatedEventCard key={event.id} event={event} />;
return (
<AnimatedEventCard
key={event.id}
event={event}
selectedGroup={cameraGroup}
/>
);
})}
</div>
</TooltipProvider>