From 469c0b40a392326cb4195dd70eb50568623b86ae Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sat, 30 Oct 2021 13:12:02 -0600 Subject: [PATCH] ui(admin): add views for settings --- .../admin/nests/eggs/EggSettingsContainer.tsx | 2 +- .../allocations/CreateAllocationForm.tsx | 82 +++++++------ .../admin/servers/ServerSettingsContainer.tsx | 2 +- .../admin/settings/GeneralSettings.tsx | 46 ++++++++ .../admin/settings/MailSettings.tsx | 111 ++++++++++++++++++ .../admin/settings/SettingsContainer.tsx | 47 ++++++++ .../scripts/components/elements/Field.tsx | 4 +- resources/scripts/routers/AdminRouter.tsx | 2 +- 8 files changed, 249 insertions(+), 47 deletions(-) create mode 100644 resources/scripts/components/admin/settings/GeneralSettings.tsx create mode 100644 resources/scripts/components/admin/settings/MailSettings.tsx diff --git a/resources/scripts/components/admin/nests/eggs/EggSettingsContainer.tsx b/resources/scripts/components/admin/nests/eggs/EggSettingsContainer.tsx index 4853a1246..dc2db3419 100644 --- a/resources/scripts/components/admin/nests/eggs/EggSettingsContainer.tsx +++ b/resources/scripts/components/admin/nests/eggs/EggSettingsContainer.tsx @@ -251,7 +251,7 @@ export default function EggSettingsContainer ({ egg }: { egg: Egg }) { -
+
- { - ({ isSubmitting, isValid }) => ( -
- ( + + + + + +
+ +
- - -
- +
+
+
- -
-
- -
-
- - ) - } +
+ + )} ); } diff --git a/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx b/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx index 6646ebb3e..e46fe2473 100644 --- a/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx +++ b/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx @@ -79,7 +79,7 @@ export default () => {
-
+
+
+
+ + )} + + ); +}; diff --git a/resources/scripts/components/admin/settings/SettingsContainer.tsx b/resources/scripts/components/admin/settings/SettingsContainer.tsx index 3e2fc2066..da6461036 100644 --- a/resources/scripts/components/admin/settings/SettingsContainer.tsx +++ b/resources/scripts/components/admin/settings/SettingsContainer.tsx @@ -1,8 +1,17 @@ +import MailSettings from '@/components/admin/settings/MailSettings'; +import { AdjustmentsIcon, ChipIcon, CodeIcon, MailIcon, ShieldCheckIcon } from '@heroicons/react/outline'; import React from 'react'; +import { Route, useLocation } from 'react-router'; +import { Switch } from 'react-router-dom'; import tw from 'twin.macro'; +import FlashMessageRender from '@/components/FlashMessageRender'; import AdminContentBlock from '@/components/admin/AdminContentBlock'; +import { SubNavigation, SubNavigationLink } from '@/components/admin/SubNavigation'; +import GeneralSettings from '@/components/admin/settings/GeneralSettings'; export default () => { + const location = useLocation(); + return (
@@ -11,6 +20,44 @@ export default () => {

Configure and manage settings for Pterodactyl.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Security

+
+ +

Features

+
+ +

Advanced

+
+
); }; diff --git a/resources/scripts/components/elements/Field.tsx b/resources/scripts/components/elements/Field.tsx index 67b8c894b..2d86529fd 100644 --- a/resources/scripts/components/elements/Field.tsx +++ b/resources/scripts/components/elements/Field.tsx @@ -77,9 +77,9 @@ export const TextareaField = forwardRef( TextareaField.displayName = 'TextareaField'; export const FieldRow = styled.div` - ${tw`grid grid-cols-1 sm:grid-cols-2 gap-x-6 mb-6`}; + ${tw`grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-6 mb-6`}; & > div { - ${tw`mb-6 sm:mb-0 sm:w-full sm:flex sm:flex-col`}; + ${tw`sm:w-full sm:flex sm:flex-col`}; } `; diff --git a/resources/scripts/routers/AdminRouter.tsx b/resources/scripts/routers/AdminRouter.tsx index 51b1b0b9a..0adc0f1a2 100644 --- a/resources/scripts/routers/AdminRouter.tsx +++ b/resources/scripts/routers/AdminRouter.tsx @@ -120,7 +120,7 @@ const AdminRouter = ({ location, match }: RouteComponentProps) => {
- +