Fix list views

This commit is contained in:
Nicolas Mowen 2024-03-27 16:51:30 -06:00
parent ba8c89d6ab
commit 542f37febc
2 changed files with 32 additions and 36 deletions

View File

@ -1,4 +1,4 @@
import { LuDisc, LuDisc2, LuDisc3, LuX } from "react-icons/lu"; import { LuX } from "react-icons/lu";
import { Button } from "../ui/button"; import { Button } from "../ui/button";
import { FaCompactDisc } from "react-icons/fa"; import { FaCompactDisc } from "react-icons/fa";

View File

@ -385,7 +385,9 @@ export function RecordingView({
<Timeline <Timeline
contentRef={contentRef} contentRef={contentRef}
mainCamera={mainCamera} mainCamera={mainCamera}
timelineType={timelineType ?? "timeline"} timelineType={
(exportRange == undefined ? timelineType : "timeline") ?? "timeline"
}
timeRange={timeRange} timeRange={timeRange}
mainCameraReviewItems={mainCameraReviewItems} mainCameraReviewItems={mainCameraReviewItems}
currentTime={currentTime} currentTime={currentTime}
@ -448,15 +450,17 @@ function Timeline({
} }
}, [exportRange, exportStart, exportEnd, setExportRange, setCurrentTime]); }, [exportRange, exportStart, exportEnd, setExportRange, setCurrentTime]);
if (exportRange != undefined || timelineType == "timeline") {
return ( return (
<div <div
className={ className={`${
isDesktop isDesktop
? "w-[100px] mt-2 overflow-y-auto no-scrollbar" ? `${timelineType == "timeline" ? "w-[100px]" : "w-60"} mt-2 overflow-y-auto no-scrollbar`
: "flex-grow overflow-hidden" : "flex-grow overflow-hidden"
} } relative`}
> >
<div className="absolute top-0 inset-x-0 z-20 w-full h-[30px] bg-gradient-to-b from-secondary to-transparent pointer-events-none"></div>
<div className="absolute bottom-0 inset-x-0 z-20 w-full h-[30px] bg-gradient-to-t from-secondary to-transparent pointer-events-none"></div>
{timelineType == "timeline" ? (
<MotionReviewTimeline <MotionReviewTimeline
segmentDuration={30} segmentDuration={30}
timestampSpread={15} timestampSpread={15}
@ -477,17 +481,8 @@ function Timeline({
contentRef={contentRef} contentRef={contentRef}
onHandlebarDraggingChange={(scrubbing) => setScrubbing(scrubbing)} onHandlebarDraggingChange={(scrubbing) => setScrubbing(scrubbing)}
/> />
</div> ) : (
); <div className="h-full flex flex-col gap-4 overflow-auto p-4 bg-secondary">
}
return (
<div
className={`${isDesktop ? "w-60" : "w-full"} h-full relative p-4 flex flex-col gap-4 bg-secondary`}
>
<div className="absolute top-0 inset-x-0 z-20 w-full h-[30px] bg-gradient-to-b from-secondary to-transparent pointer-events-none"></div>
<div className="absolute bottom-0 inset-x-0 z-20 w-full h-[30px] bg-gradient-to-t from-secondary to-transparent pointer-events-none"></div>
<div className="h-full overflow-auto">
{mainCameraReviewItems.map((review) => { {mainCameraReviewItems.map((review) => {
if (review.severity == "significant_motion") { if (review.severity == "significant_motion") {
return; return;
@ -503,6 +498,7 @@ function Timeline({
); );
})} })}
</div> </div>
)}
</div> </div>
); );
} }