mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 22:25:24 +03:00
Fix clicking
This commit is contained in:
parent
ebcae504cd
commit
52d4fb1cfc
@ -37,7 +37,13 @@ export default function Chip({
|
|||||||
"z-10 flex items-center rounded-2xl px-2 py-1.5",
|
"z-10 flex items-center rounded-2xl px-2 py-1.5",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
onClick={onClick}
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
if (onClick) {
|
||||||
|
onClick();
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import { VideoPreview } from "../preview/ScrubbablePreview";
|
|||||||
import { Preview } from "@/types/preview";
|
import { Preview } from "@/types/preview";
|
||||||
import { SearchResult } from "@/types/search";
|
import { SearchResult } from "@/types/search";
|
||||||
import { LuInfo } from "react-icons/lu";
|
import { LuInfo } from "react-icons/lu";
|
||||||
|
import useContextMenu from "@/hooks/use-contextmenu";
|
||||||
|
|
||||||
type SearchPlayerProps = {
|
type SearchPlayerProps = {
|
||||||
searchResult: SearchResult;
|
searchResult: SearchResult;
|
||||||
@ -54,6 +55,10 @@ export default function SearchThumbnailPlayer({
|
|||||||
preventScrollOnSwipe: true,
|
preventScrollOnSwipe: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useContextMenu(imgRef, () => {
|
||||||
|
onClick(searchResult, true);
|
||||||
|
});
|
||||||
|
|
||||||
// playback
|
// playback
|
||||||
|
|
||||||
const relevantPreview = useMemo(() => {
|
const relevantPreview = useMemo(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user