Handle middle mouse button clicks (#13678)

* Handle middle mouse button clicks

* Fix up
This commit is contained in:
Nicolas Mowen 2024-09-11 11:26:01 -06:00 committed by GitHub
parent 3972642ba0
commit 22ee6bb137
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 0 deletions

View File

@ -131,6 +131,11 @@ export function AnimatedEventCard({
<div
className="size-full cursor-pointer overflow-hidden rounded md:rounded-lg"
onClick={onOpenReview}
onAuxClick={() =>
window
.open(`${baseUrl}review?id=${event.id}`, "_blank")
?.focus()
}
>
{!alertVideos ? (
<img

View File

@ -19,6 +19,7 @@ import { capitalizeFirstLetter } from "@/utils/stringUtil";
import { cn } from "@/lib/utils";
import { TbExclamationCircle } from "react-icons/tb";
import { TooltipPortal } from "@radix-ui/react-tooltip";
import { baseUrl } from "@/api/baseUrl";
type LivePlayerProps = {
cameraRef?: (ref: HTMLDivElement | null) => void;
@ -224,6 +225,9 @@ export default function LivePlayer({
className,
)}
onClick={onClick}
onAuxClick={() =>
window.open(`${baseUrl}#${cameraConfig.name}`, "_blank")?.focus()
}
>
{((showStillWithoutActivity && !liveReady) || liveReady) && (
<>

View File

@ -20,6 +20,7 @@ import { capitalizeFirstLetter } from "@/utils/stringUtil";
import { cn } from "@/lib/utils";
import { InProgressPreview, VideoPreview } from "../preview/ScrubbablePreview";
import { Preview } from "@/types/preview";
import { baseUrl } from "@/api/baseUrl";
type PreviewPlayerProps = {
review: ReviewSegment;
@ -175,6 +176,9 @@ export default function PreviewThumbnailPlayer({
onMouseOver={isMobile ? undefined : () => setIsHovered(true)}
onMouseLeave={isMobile ? undefined : () => setIsHovered(false)}
onClick={handleOnClick}
onAuxClick={() =>
window.open(`${baseUrl}review?id=${review.id}`, "_blank")?.focus()
}
{...swipeHandlers}
>
{playingBack && (