From 22ee6bb13726f337f7b0a825a725d3e9ffdd2d2b Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 11 Sep 2024 11:26:01 -0600 Subject: [PATCH] Handle middle mouse button clicks (#13678) * Handle middle mouse button clicks * Fix up --- web/src/components/card/AnimatedEventCard.tsx | 5 +++++ web/src/components/player/LivePlayer.tsx | 4 ++++ web/src/components/player/PreviewThumbnailPlayer.tsx | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/web/src/components/card/AnimatedEventCard.tsx b/web/src/components/card/AnimatedEventCard.tsx index f18573542..1228ebd05 100644 --- a/web/src/components/card/AnimatedEventCard.tsx +++ b/web/src/components/card/AnimatedEventCard.tsx @@ -131,6 +131,11 @@ export function AnimatedEventCard({
+ window + .open(`${baseUrl}review?id=${event.id}`, "_blank") + ?.focus() + } > {!alertVideos ? ( void; @@ -224,6 +225,9 @@ export default function LivePlayer({ className, )} onClick={onClick} + onAuxClick={() => + window.open(`${baseUrl}#${cameraConfig.name}`, "_blank")?.focus() + } > {((showStillWithoutActivity && !liveReady) || liveReady) && ( <> diff --git a/web/src/components/player/PreviewThumbnailPlayer.tsx b/web/src/components/player/PreviewThumbnailPlayer.tsx index 409618b86..d20ad1ec7 100644 --- a/web/src/components/player/PreviewThumbnailPlayer.tsx +++ b/web/src/components/player/PreviewThumbnailPlayer.tsx @@ -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 && (