From 00b44bf3bb37e8908a22abb5f79662fe83efbfab Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Wed, 4 Aug 2021 22:16:52 -0600 Subject: [PATCH] ui(admin): tweaks to server management --- .../components/admin/servers/OwnerSelect.tsx | 4 +- .../admin/servers/ServerSettingsContainer.tsx | 285 ++++++++---------- .../admin/servers/ServerStartupContainer.tsx | 12 +- .../scripts/components/elements/Button.tsx | 2 +- 4 files changed, 143 insertions(+), 160 deletions(-) diff --git a/resources/scripts/components/admin/servers/OwnerSelect.tsx b/resources/scripts/components/admin/servers/OwnerSelect.tsx index c5c89a1e..c29348c6 100644 --- a/resources/scripts/components/admin/servers/OwnerSelect.tsx +++ b/resources/scripts/components/admin/servers/OwnerSelect.tsx @@ -27,7 +27,7 @@ export default ({ selected }: { selected: User | null }) => { }; const getSelectedText = (user: User | null): string => { - return user?.username || ''; + return user?.email || ''; }; return ( @@ -47,7 +47,7 @@ export default ({ selected }: { selected: User | null }) => { > {users?.map(d => ( ))} diff --git a/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx b/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx index cf387ecb..54c4b764 100644 --- a/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx +++ b/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx @@ -19,7 +19,6 @@ interface Values { uuid: string; identifier: string; name: string; - description: string; memory: number; swap: number; @@ -54,42 +53,37 @@ const ServerFeatureContainer = () => { -
-
-
- -
- -
- -
+
+
+
-
-
- -
+
+
- +
+ +
+
); }; @@ -109,83 +103,80 @@ const ServerResourceContainer = () => { -
-
-
- -
- -
- -
+
+
+
-
-
- -
+
+ +
+
-
- -
+
+
+
-
-
- -
+
+ +
+
-
- -
+
+
+
-
-
- -
+
+
+
- +
+
+ +
+
); }; @@ -205,42 +196,31 @@ const ServerSettingsContainer = () => { -
-
-
- -
- -
- -
+
+
+
-
-
- -
- -
- -
+
+
- +
+ +
+
+ +
+
); }; @@ -278,7 +258,6 @@ export default () => { uuid: server.uuid, identifier: server.identifier, name: server.name, - description: server.description, memory: server.limits.memory, swap: server.limits.swap, @@ -302,28 +281,30 @@ export default () => { > { ({ isSubmitting, isValid }) => ( -
-
-
- +
+
+
+
+ +
+
+ +
-
- -
-
-
-
- -
-
-
- +
+
+ +
+
+
+ +
-
+ ) } diff --git a/resources/scripts/components/admin/servers/ServerStartupContainer.tsx b/resources/scripts/components/admin/servers/ServerStartupContainer.tsx index 20d9ad65..4120155e 100644 --- a/resources/scripts/components/admin/servers/ServerStartupContainer.tsx +++ b/resources/scripts/components/admin/servers/ServerStartupContainer.tsx @@ -87,11 +87,13 @@ const ServerServiceContainer = () => { Nest/Egg Selector HERE
- +
+ +
diff --git a/resources/scripts/components/elements/Button.tsx b/resources/scripts/components/elements/Button.tsx index 7da93ed3..3b0b820d 100644 --- a/resources/scripts/components/elements/Button.tsx +++ b/resources/scripts/components/elements/Button.tsx @@ -10,7 +10,7 @@ interface Props { } const ButtonStyle = styled.button>` - ${tw`relative inline-block rounded p-2 uppercase tracking-wide text-sm transition-all duration-150 border`}; + ${tw`relative inline-block rounded p-2 tracking-wide text-sm transition-all duration-150 border`}; & > span { ${tw`select-none`};