diff --git a/web/src/components/card/TimelineItemCard.tsx b/web/src/components/card/TimelineItemCard.tsx deleted file mode 100644 index 9ebbc2c88..000000000 --- a/web/src/components/card/TimelineItemCard.tsx +++ /dev/null @@ -1,144 +0,0 @@ -import { getTimelineItemDescription } from "@/utils/timelineUtil"; -import { Button } from "../ui/button"; -import Logo from "../Logo"; -import { formatUnixTimestampToDateTime } from "@/utils/dateUtil"; -import useSWR from "swr"; -import { FrigateConfig } from "@/types/frigateConfig"; -import VideoPlayer from "../player/VideoPlayer"; -import { Card } from "../ui/card"; -import { useApiHost } from "@/api"; -import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, -} from "../ui/alert-dialog"; -import { useCallback } from "react"; -import axios from "axios"; - -type TimelineItemCardProps = { - timeline: Timeline; - relevantPreview: Preview | undefined; - onSelect: () => void; -}; -export default function TimelineItemCard({ - timeline, - relevantPreview, - onSelect, -}: TimelineItemCardProps) { - const { data: config } = useSWR("config"); - const apiHost = useApiHost(); - - const onSubmitToPlus = useCallback( - async (falsePositive: boolean) => { - falsePositive - ? await axios.put(`events/${timeline.source_id}/false_positive`) - : await axios.post(`events/${timeline.source_id}/plus`, { - include_annotation: 1, - }); - }, - [timeline] - ); - - return ( - -
- { - if (relevantPreview) { - player.pause(); // autoplay + pause is required for iOS - player.currentTime(timeline.timestamp - relevantPreview.start); - } - }} - /> -
-
-
- {getTimelineItemDescription(timeline)} -
-
- {formatUnixTimestampToDateTime(timeline.timestamp, { - strftime_fmt: - config?.ui.time_format == "24hour" ? "%H:%M:%S" : "%I:%M:%S %p", - time_style: "medium", - date_style: "medium", - })} -
- {timeline.source == "tracked_object" && ( - - - - - - - Submit To Frigate+ - - Objects in locations you want to avoid are not false - positives. Submitting them as false positives will confuse the - model. - - - {`${timeline.data.label}`} - - Cancel - onSubmitToPlus(false)} - > - This is a {timeline.data.label} - - onSubmitToPlus(true)} - > - This is not a {timeline.data.label} - - - - - )} -
-
- ); -} diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx index e0e27a321..1aab6876b 100644 --- a/web/src/components/filter/ReviewFilterGroup.tsx +++ b/web/src/components/filter/ReviewFilterGroup.tsx @@ -13,10 +13,7 @@ import { } from "../ui/dropdown-menu"; import { Calendar } from "../ui/calendar"; import { ReviewFilter } from "@/types/review"; -import { - formatUnixTimestampToDateTime, - getEndOfDayTimestamp, -} from "@/utils/dateUtil"; +import { getEndOfDayTimestamp } from "@/utils/dateUtil"; import { useFormattedTimestamp } from "@/hooks/use-date-utils"; const ATTRIBUTES = ["amazon", "face", "fedex", "license_plate", "ups"];