mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-11 17:47:37 +03:00
Don't portal upload dialog when not in fullscreen
This commit is contained in:
parent
08967aa196
commit
9c012daef5
@ -289,6 +289,7 @@ export default function VideoControls({
|
|||||||
}}
|
}}
|
||||||
onUploadFrame={onUploadFrame}
|
onUploadFrame={onUploadFrame}
|
||||||
containerRef={containerRef}
|
containerRef={containerRef}
|
||||||
|
fullscreen={fullscreen}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{features.fullscreen && toggleFullscreen && (
|
{features.fullscreen && toggleFullscreen && (
|
||||||
@ -306,6 +307,7 @@ type FrigatePlusUploadButtonProps = {
|
|||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
onUploadFrame: () => void;
|
onUploadFrame: () => void;
|
||||||
containerRef?: React.MutableRefObject<HTMLDivElement | null>;
|
containerRef?: React.MutableRefObject<HTMLDivElement | null>;
|
||||||
|
fullscreen?: boolean;
|
||||||
};
|
};
|
||||||
function FrigatePlusUploadButton({
|
function FrigatePlusUploadButton({
|
||||||
video,
|
video,
|
||||||
@ -313,6 +315,7 @@ function FrigatePlusUploadButton({
|
|||||||
onClose,
|
onClose,
|
||||||
onUploadFrame,
|
onUploadFrame,
|
||||||
containerRef,
|
containerRef,
|
||||||
|
fullscreen,
|
||||||
}: FrigatePlusUploadButtonProps) {
|
}: FrigatePlusUploadButtonProps) {
|
||||||
const { t } = useTranslation(["components/player"]);
|
const { t } = useTranslation(["components/player"]);
|
||||||
|
|
||||||
@ -349,7 +352,11 @@ function FrigatePlusUploadButton({
|
|||||||
/>
|
/>
|
||||||
</AlertDialogTrigger>
|
</AlertDialogTrigger>
|
||||||
<AlertDialogContent
|
<AlertDialogContent
|
||||||
portalProps={{ container: containerRef?.current }}
|
portalProps={
|
||||||
|
fullscreen && containerRef?.current
|
||||||
|
? { container: containerRef.current }
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
className="md:max-w-2xl lg:max-w-3xl xl:max-w-4xl"
|
className="md:max-w-2xl lg:max-w-3xl xl:max-w-4xl"
|
||||||
>
|
>
|
||||||
<AlertDialogHeader>
|
<AlertDialogHeader>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user