diff --git a/src/app/[orgId]/settings/clients/machine/create/page.tsx b/src/app/[orgId]/settings/clients/machine/create/page.tsx index 42dfe0d5..5fb12b46 100644 --- a/src/app/[orgId]/settings/clients/machine/create/page.tsx +++ b/src/app/[orgId]/settings/clients/machine/create/page.tsx @@ -25,7 +25,7 @@ import { createElement, useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; import { Input } from "@app/components/ui/input"; -import { InfoIcon, Terminal } from "lucide-react"; +import { ChevronDown, ChevronUp, InfoIcon, Terminal } from "lucide-react"; import { Button } from "@app/components/ui/button"; import CopyTextBox from "@app/components/CopyTextBox"; import CopyToClipboard from "@app/components/CopyToClipboard"; @@ -121,6 +121,7 @@ export default function Page() { const [olmCommand, setOlmCommand] = useState(""); const [createLoading, setCreateLoading] = useState(false); + const [showAdvancedSettings, setShowAdvancedSettings] = useState(false); const [clientDefaults, setClientDefaults] = useState(null); @@ -443,33 +444,54 @@ export default function Page() { )} /> - - ( - - - {t("clientAddress")} - - - + + + {showAdvancedSettings && ( + ( + + + {t("clientAddress")} + + + + + + + {t( + "addressDescription" )} - {...field} - /> - - - - {t( - "addressDescription" - )} - - - )} - /> + + + )} + /> + )} diff --git a/src/app/[orgId]/settings/sites/create/page.tsx b/src/app/[orgId]/settings/sites/create/page.tsx index 744a32e7..780b3263 100644 --- a/src/app/[orgId]/settings/sites/create/page.tsx +++ b/src/app/[orgId]/settings/sites/create/page.tsx @@ -25,7 +25,7 @@ import { createElement, useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; import { Input } from "@app/components/ui/input"; -import { InfoIcon, Terminal } from "lucide-react"; +import { ChevronDown, ChevronUp, InfoIcon, Terminal } from "lucide-react"; import { Button } from "@app/components/ui/button"; import CopyTextBox from "@app/components/CopyTextBox"; import CopyToClipboard from "@app/components/CopyToClipboard"; @@ -204,6 +204,7 @@ export default function Page() { const [createLoading, setCreateLoading] = useState(false); const [acceptClients, setAcceptClients] = useState(true); const [newtVersion, setNewtVersion] = useState("latest"); + const [showAdvancedSettings, setShowAdvancedSettings] = useState(false); const [siteDefaults, setSiteDefaults] = useState(null); @@ -727,45 +728,68 @@ WantedBy=default.target` )} /> - {form.watch("method") === "newt" && ( - ( - - - {t("siteAddress")} - - - { - setClientAddress( - e.target - .value - ); - field.onChange( - e.target - .value - ); - }} - /> - - - - {t( - "siteAddressDescription" - )} - - +
+ +
+ {form.watch("method") === "newt" && + showAdvancedSettings && ( + ( + + + {t("siteAddress")} + + + { + setClientAddress( + e + .target + .value + ); + field.onChange( + e + .target + .value + ); + }} + /> + + + + {t( + "siteAddressDescription" + )} + + + )} + /> + )}