From 92211ef929a83068197e55678b6b10ced9ffd262 Mon Sep 17 00:00:00 2001 From: Chad Burt Date: Thu, 26 Sep 2024 13:38:00 -0700 Subject: [PATCH] WIP --- packages/client/src/admin/Settings.tsx | 260 +++++++++++------- .../src/queries/UpdateProjectSettings.graphql | 3 + 2 files changed, 165 insertions(+), 98 deletions(-) diff --git a/packages/client/src/admin/Settings.tsx b/packages/client/src/admin/Settings.tsx index bb8a84cd..3f8a54fb 100644 --- a/packages/client/src/admin/Settings.tsx +++ b/packages/client/src/admin/Settings.tsx @@ -52,6 +52,7 @@ import getSlug from "../getSlug"; import { TranslateIcon } from "@heroicons/react/outline"; import TranslatedPropControl from "../components/TranslatedPropControl"; import bytes from "bytes"; +import { Pencil1Icon, Pencil2Icon } from "@radix-ui/react-icons"; export default function Settings() { const { data } = useCurrentProjectMetadata(); @@ -76,7 +77,14 @@ export default function Settings() {
- {data && data.project && } + {data && data.project && ( + + )}
@@ -110,8 +118,14 @@ function BasicSettingsForm(props: { description?: string | null; url: string; slug: string; + supportEmail: string; }) { + const { prompt } = useDialog(); const { t } = useTranslation("admin"); + const onError = useGlobalErrorHandler(); + const [updateProject, updateProjectState] = useUpdateProjectSettingsMutation({ + onError, + }); const [copiedToClipboard, setCopiedToClipboard] = useState(false); useEffect(() => { if (copiedToClipboard === true) { @@ -166,6 +180,47 @@ function BasicSettingsForm(props: { className="p-0.5 absolute -right-9 top-8 -mt-0.5 border rounded hover:shadow-sm" />
+
+ + +