forked from Github/frigate
Adjustments and fixes (#10346)
* Increase duration of alerts and detections * Add key * Fix cancel button * Fix motion review when switching days * Add reset buttons and make calendar apply immediately * Adjust apis for motion and audio activity * Write review thumbs as webp and reduce size
This commit is contained in:
@@ -260,6 +260,7 @@ export default function EventView({
|
||||
)}
|
||||
{severity == "significant_motion" && (
|
||||
<MotionReview
|
||||
key={timeRange.before}
|
||||
contentRef={contentRef}
|
||||
reviewItems={reviewItems}
|
||||
relevantPreviews={relevantPreviews}
|
||||
@@ -563,7 +564,7 @@ function MotionReview({
|
||||
// motion data
|
||||
|
||||
const { data: motionData } = useSWR<MotionData[]>([
|
||||
"review/activity",
|
||||
"review/activity/motion",
|
||||
{
|
||||
before: timeRange.before,
|
||||
after: timeRange.after,
|
||||
@@ -598,7 +599,7 @@ function MotionReview({
|
||||
|
||||
const [selectedRangeIdx, setSelectedRangeIdx] = useState(initialIndex);
|
||||
const [currentTime, setCurrentTime] = useState<number>(
|
||||
startTime ?? timeRangeSegments.ranges[selectedRangeIdx].start,
|
||||
startTime ?? timeRangeSegments.ranges[selectedRangeIdx]?.start,
|
||||
);
|
||||
const currentTimeRange = useMemo(
|
||||
() => timeRangeSegments.ranges[selectedRangeIdx],
|
||||
|
||||
Reference in New Issue
Block a user