forked from Github/frigate
Add ability to view tracked objects in Explore from review item details pane (#14744)
This commit is contained in:
@@ -40,6 +40,7 @@ import {
|
||||
import { useOverlayState } from "@/hooks/use-overlay-state";
|
||||
import { DownloadVideoButton } from "@/components/button/DownloadVideoButton";
|
||||
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||
import { LuSearch } from "react-icons/lu";
|
||||
|
||||
type ReviewDetailDialogProps = {
|
||||
review?: ReviewSegment;
|
||||
@@ -53,6 +54,8 @@ export default function ReviewDetailDialog({
|
||||
revalidateOnFocus: false,
|
||||
});
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
// upload
|
||||
|
||||
const [upload, setUpload] = useState<Event>();
|
||||
@@ -219,6 +222,21 @@ export default function ReviewDetailDialog({
|
||||
)}
|
||||
{event.sub_label ?? event.label} (
|
||||
{Math.round(event.data.top_score * 100)}%)
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<div
|
||||
className="cursor-pointer"
|
||||
onClick={() => {
|
||||
navigate(`/explore?event_id=${event.id}`);
|
||||
}}
|
||||
>
|
||||
<LuSearch className="size-4 text-muted-foreground" />
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipPortal>
|
||||
<TooltipContent>View in Explore</TooltipContent>
|
||||
</TooltipPortal>
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -114,6 +114,7 @@ export default function Explore() {
|
||||
max_score: searchSearchParams["max_score"],
|
||||
has_snapshot: searchSearchParams["has_snapshot"],
|
||||
has_clip: searchSearchParams["has_clip"],
|
||||
event_id: searchSearchParams["event_id"],
|
||||
limit:
|
||||
Object.keys(searchSearchParams).length == 0 ? API_LIMIT : undefined,
|
||||
timezone,
|
||||
|
||||
Reference in New Issue
Block a user