From fc59c83e164668cf175524bd738025c4781a98ab Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 22 Oct 2024 22:09:57 -0500 Subject: [PATCH] Add download chips to search item details video and snapshot panes (#14525) --- .../components/button/DownloadVideoButton.tsx | 21 ++---- .../overlay/detail/SearchDetailDialog.tsx | 66 +++++++++++++++---- 2 files changed, 61 insertions(+), 26 deletions(-) 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 (