From 510cdf4f1e73d86a634f31c7f653a82d0c1993b3 Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Mon, 21 Oct 2024 17:26:28 +0200 Subject: [PATCH] update form styling --- .../plural-cloud/EditPluralOIDCClient.tsx | 354 +++++++++--------- 1 file changed, 181 insertions(+), 173 deletions(-) diff --git a/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClient.tsx b/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClient.tsx index 97426eb70..a79f8dbb5 100644 --- a/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClient.tsx +++ b/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClient.tsx @@ -4,6 +4,7 @@ import { Chip, Codeline, Divider, + FillLevelProvider, FormField, Input, ListBoxItem, @@ -189,202 +190,209 @@ function EditPluralOIDCClient({ provider?.clientSecret ?? data?.createOidcProvider?.clientSecret return ( -
+
- - - {clientId} - - - - - {clientSecret} - - - {!data && ( - <> - - - setName(value)} - /> - - - setDescription(value)} - /> - - !!user) - .map(({ user }) => user?.email)} - fetcher={fetchUsers} - add={(user) => setBindings([...bindings, { user }])} - remove={(email) => - setBindings( - bindings.filter(({ user }) => !user || user.email !== email) - ) +
+ + - !!group) - .map(({ group: { name } }) => name)} - fetcher={fetchGroups} - add={(group) => setBindings([...bindings, { group }])} - remove={(name) => - setBindings( - bindings.filter(({ group }) => !group || group.name !== name) - ) + > + {clientId} + + + + - - setDescription(value)} /> - - - -
+ !!user) + .map(({ user }) => user?.email)} + fetcher={fetchUsers} + add={(user) => setBindings([...bindings, { user }])} + remove={(email) => + setBindings( + bindings.filter(({ user }) => !user || user.email !== email) + ) + } + /> + !!group) + .map(({ group: { name } }) => name)} + fetcher={fetchGroups} + add={(group) => setBindings([...bindings, { group }])} + remove={(name) => + setBindings( + bindings.filter( + ({ group }) => !group || group.name !== name + ) + ) + } + /> + -
- setUrl(value)} + + +
- {redirectUris.map((url, i) => ( - removeUrl(url)} +
+ setUrl(value)} + /> + +
+
+ {redirectUris.map((url, i) => ( + removeUrl(url)} + fillLevel={2} + > + {url} + + ))} +
-
-
- + + + )} +
+ {createError && ( + )} -
- {createError && ( - - )} - {updateError && ( - - )} -
- {!data ? ( - <> - -
- - - ) : ( - + {updateError && ( + )} +
+ {!data ? ( + <> + +
+ + + ) : ( + + )} +
-
+ ) }