diff --git a/web/src/components/button/DownloadVideoButton.tsx b/web/src/components/button/DownloadVideoButton.tsx index 5ea1f8465..7545217bf 100644 --- a/web/src/components/button/DownloadVideoButton.tsx +++ b/web/src/components/button/DownloadVideoButton.tsx @@ -4,17 +4,20 @@ import { toast } from "sonner"; import ActivityIndicator from "../indicators/activity-indicator"; import { FaDownload } from "react-icons/fa"; import { formatUnixTimestampToDateTime } from "@/utils/dateUtil"; +import { cn } from "@/lib/utils"; type DownloadVideoButtonProps = { source: string; camera: string; startTime: number; + className?: string; }; export function DownloadVideoButton({ source, camera, startTime, + className, }: DownloadVideoButtonProps) { const [isDownloading, setIsDownloading] = useState(false); @@ -32,13 +35,6 @@ export function DownloadVideoButton({ }); }; - const handleDownloadEnd = () => { - setIsDownloading(false); - toast.success("Download completed successfully.", { - position: "top-center", - }); - }; - return (
diff --git a/web/src/components/overlay/detail/SearchDetailDialog.tsx b/web/src/components/overlay/detail/SearchDetailDialog.tsx index 1bb887181..5df921d4f 100644 --- a/web/src/components/overlay/detail/SearchDetailDialog.tsx +++ b/web/src/components/overlay/detail/SearchDetailDialog.tsx @@ -27,6 +27,7 @@ import ActivityIndicator from "@/components/indicators/activity-indicator"; import { FaCheckCircle, FaChevronDown, + FaDownload, FaHistory, FaImage, FaRegListAlt, @@ -68,6 +69,7 @@ import { PopoverTrigger, } from "@/components/ui/popover"; import { LuInfo } from "react-icons/lu"; +import { TooltipPortal } from "@radix-ui/react-tooltip"; const SEARCH_TABS = [ "details", @@ -577,16 +579,39 @@ function ObjectSnapshotTab({ }} > {search?.id && ( - {`${search?.label}`} { - onImgLoad(); - }} - /> +
+ {`${search?.label}`} { + onImgLoad(); + }} + /> +
+ + + + + + + + + + Download + + +
+
)} {search.plus_id !== "not_enabled" && search.end_time && ( @@ -669,7 +694,7 @@ export function VideoTab({ search }: VideoTabProps) { {reviewItem && (
@@ -689,7 +714,24 @@ export function VideoTab({ search }: VideoTabProps) { - View in History + + View in History + + + + + + + + + + + + Download +
)}