mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-27 08:54:42 +03:00
Redesign Recordings View (#10690)
* Use full width top bar * Make each item in review filter group optional * Remove export creation from export page * Consolidate packages and fix opening recording from event * Use common type for time range * Move timeline to separate component * Add events list view to recordings view * Fix loading of images * Fix incorrect labels * use overlay state for selected timeline type * Fix up for mobile view for now * replace overlay state * fix comparison * remove unused
This commit is contained in:
@@ -17,9 +17,9 @@ import { isFirefox, isMobile, isSafari } from "react-device-detect";
|
||||
import Chip from "@/components/indicators/Chip";
|
||||
import { useFormattedTimestamp } from "@/hooks/use-date-utils";
|
||||
import useImageLoaded from "@/hooks/use-image-loaded";
|
||||
import { Skeleton } from "../ui/skeleton";
|
||||
import { useSwipeable } from "react-swipeable";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
|
||||
import ImageLoadingIndicator from "../indicators/ImageLoadingIndicator";
|
||||
|
||||
type PreviewPlayerProps = {
|
||||
review: ReviewSegment;
|
||||
@@ -187,11 +187,14 @@ export default function PreviewThumbnailPlayer({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<PreviewPlaceholder imgLoaded={imgLoaded} />
|
||||
<ImageLoadingIndicator
|
||||
className="absolute inset-0"
|
||||
imgLoaded={imgLoaded}
|
||||
/>
|
||||
<div className={`${imgLoaded ? "visible" : "invisible"}`}>
|
||||
<img
|
||||
ref={imgRef}
|
||||
className={`w-full h-full transition-opacity ${
|
||||
className={`size-full transition-opacity ${
|
||||
playingBack ? "opacity-0" : "opacity-100"
|
||||
}`}
|
||||
src={`${apiHost}${review.thumb_path.replace("/media/frigate/", "")}`}
|
||||
@@ -700,15 +703,3 @@ function InProgressPreview({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function PreviewPlaceholder({ imgLoaded }: { imgLoaded: boolean }) {
|
||||
if (imgLoaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
return isSafari ? (
|
||||
<div className={`absolute inset-0 bg-gray-300 pointer-events-none`} />
|
||||
) : (
|
||||
<Skeleton className={`absolute inset-0 pointer-events-none`} />
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user