mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 23:25:25 +03:00
view more icon links to search for object type
This commit is contained in:
parent
e9a8c42734
commit
52c8386b52
@ -66,10 +66,9 @@ function ThumbnailRow({
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
||||||
|
|
||||||
const handleSimilaritySearch = (eventId: string) => {
|
const handleSearch = (label: string) => {
|
||||||
const similaritySearchParams = new URLSearchParams({
|
const similaritySearchParams = new URLSearchParams({
|
||||||
search_type: "similarity",
|
labels: label,
|
||||||
event_id: eventId,
|
|
||||||
}).toString();
|
}).toString();
|
||||||
navigate(`/explore?${similaritySearchParams}`);
|
navigate(`/explore?${similaritySearchParams}`);
|
||||||
};
|
};
|
||||||
@ -110,11 +109,7 @@ function ThumbnailRow({
|
|||||||
))}
|
))}
|
||||||
<div
|
<div
|
||||||
className="flex cursor-pointer items-center justify-center"
|
className="flex cursor-pointer items-center justify-center"
|
||||||
onClick={() =>
|
onClick={() => handleSearch(objectType)}
|
||||||
events &&
|
|
||||||
events.length > 0 &&
|
|
||||||
handleSimilaritySearch(events[events.length - 1].id)
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
@ -124,7 +119,9 @@ function ThumbnailRow({
|
|||||||
/>
|
/>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipPortal>
|
<TooltipPortal>
|
||||||
<TooltipContent>View More</TooltipContent>
|
<TooltipContent className="capitalize">
|
||||||
|
Explore More {objectType}s
|
||||||
|
</TooltipContent>
|
||||||
</TooltipPortal>
|
</TooltipPortal>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user