diff --git a/web/src/components/overlay/CreateRoleDialog.tsx b/web/src/components/overlay/CreateRoleDialog.tsx index d45dd6d2a..11418fbce 100644 --- a/web/src/components/overlay/CreateRoleDialog.tsx +++ b/web/src/components/overlay/CreateRoleDialog.tsx @@ -26,6 +26,15 @@ import { import { useTranslation } from "react-i18next"; import { FrigateConfig } from "@/types/frigateConfig"; import { CameraNameLabel } from "../camera/CameraNameLabel"; +import { isDesktop, isMobile } from "react-device-detect"; +import { cn } from "@/lib/utils"; +import { + MobilePage, + MobilePageContent, + MobilePageDescription, + MobilePageHeader, + MobilePageTitle, +} from "../mobile/MobilePage"; type CreateRoleOverlayProps = { show: boolean; @@ -100,15 +109,27 @@ export default function CreateRoleDialog({ onCancel(); }; + const Overlay = isDesktop ? Dialog : MobilePage; + const Content = isDesktop ? DialogContent : MobilePageContent; + const Header = isDesktop ? DialogHeader : MobilePageHeader; + const Description = isDesktop ? DialogDescription : MobilePageDescription; + const Title = isDesktop ? DialogTitle : MobilePageTitle; + return ( - - - - {t("roles.dialog.createRole.title")} - + + +
+ {t("roles.dialog.createRole.title")} + {t("roles.dialog.createRole.desc")} - - + +
-
-
+ + ); }