From fbec08354cb0fa3ce1144041a20ba683368517bf Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 13 May 2024 07:42:11 -0500 Subject: [PATCH] bugfixes and small UI tweaks (#11360) --- web/src/components/filter/CameraGroupSelector.tsx | 2 +- web/src/components/settings/PolygonItem.tsx | 2 +- web/src/components/timeline/EventReviewTimeline.tsx | 4 +++- web/src/views/events/EventView.tsx | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/web/src/components/filter/CameraGroupSelector.tsx b/web/src/components/filter/CameraGroupSelector.tsx index fe0ff2fbc..b80a4f939 100644 --- a/web/src/components/filter/CameraGroupSelector.tsx +++ b/web/src/components/filter/CameraGroupSelector.tsx @@ -440,7 +440,7 @@ export function CameraGroupRow({ <>

{group[0]}

diff --git a/web/src/components/settings/PolygonItem.tsx b/web/src/components/settings/PolygonItem.tsx index bfd73725d..d32465a2e 100644 --- a/web/src/components/settings/PolygonItem.tsx +++ b/web/src/components/settings/PolygonItem.tsx @@ -206,7 +206,7 @@ export default function PolygonItem({
setHoveredPolygonIndex(index)} onMouseLeave={() => setHoveredPolygonIndex(null)} diff --git a/web/src/components/timeline/EventReviewTimeline.tsx b/web/src/components/timeline/EventReviewTimeline.tsx index fe85f167a..9d5a4f70c 100644 --- a/web/src/components/timeline/EventReviewTimeline.tsx +++ b/web/src/components/timeline/EventReviewTimeline.tsx @@ -147,9 +147,11 @@ export function EventReviewTimeline({ }); } } + // don't scroll when segments update from unreviewed -> reviewed + // we know that these deps are correct + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ selectedTimelineRef, - segments, showMinimap, alignStartDateToTimeline, visibleTimestamps, diff --git a/web/src/views/events/EventView.tsx b/web/src/views/events/EventView.tsx index 391eb9d4f..da7531776 100644 --- a/web/src/views/events/EventView.tsx +++ b/web/src/views/events/EventView.tsx @@ -103,9 +103,9 @@ export default function EventView({ if (filter?.showReviewed == 1) { return { - alert: summary.total_alert, - detection: summary.total_detection, - significant_motion: summary.total_motion, + alert: summary.total_alert ?? 0, + detection: summary.total_detection ?? 0, + significant_motion: summary.total_motion ?? 0, }; } else { return {