Apply landscape margin to ptz controls on mobile only (#12272)

This commit is contained in:
Josh Hawkins 2024-07-02 18:14:38 -05:00 committed by GitHub
parent be9e606ae4
commit 784b701cc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,6 +77,7 @@ import {
import { useNavigate } from "react-router-dom";
import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch";
import useSWR from "swr";
import { cn } from "@/lib/utils";
type LiveCameraViewProps = {
config?: FrigateConfig;
@ -525,7 +526,12 @@ function PtzControlPanel({
);
return (
<div className="absolute inset-x-2 bottom-[10%] flex select-none flex-wrap items-center justify-center gap-1 md:left-[50%] md:-translate-x-[50%] md:flex-nowrap sm:landscape:ml-12">
<div
className={cn(
"absolute inset-x-2 bottom-[10%] flex select-none flex-wrap items-center justify-center gap-1 md:left-[50%] md:-translate-x-[50%] md:flex-nowrap",
isMobile && "landscape:ml-12",
)}
>
{ptz?.features?.includes("pt") && (
<>
<Button