From 2d31fc2cc9201bb93d296faae622f52c6dcdfebc Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Fri, 3 Jan 2025 16:19:15 +0100 Subject: [PATCH] feat: use same table component for OIDC client list as all other lists --- .../oidc-clients/oidc-client-list.svelte | 134 +++++------------- 1 file changed, 36 insertions(+), 98 deletions(-) diff --git a/frontend/src/routes/settings/admin/oidc-clients/oidc-client-list.svelte b/frontend/src/routes/settings/admin/oidc-clients/oidc-client-list.svelte index e980e76..5a08fb1 100644 --- a/frontend/src/routes/settings/admin/oidc-clients/oidc-client-list.svelte +++ b/frontend/src/routes/settings/admin/oidc-clients/oidc-client-list.svelte @@ -1,13 +1,11 @@ - debouncedSearch((e.target as HTMLInputElement).value)} -/> - - - - Logo - Name - Actions - - - - {#if clients.data.length === 0} - - No OIDC clients found - - {:else} - {#each clients.data as client} - - - {#if client.hasLogo} -
- {client.name} logo -
- {/if} -
- {client.name} - - - - -
- {/each} - {/if} -
-
- -{#if clients?.data?.length ?? 0 > 0} - - (clients = await oidcService.listClients(search, { - page: p, - limit: pagination.limit - }))} - bind:page={clients.pagination.currentPage} - let:pages - let:currentPage - > - - - - - {#each pages as page (page.key)} - {#if page.type === 'ellipsis'} - - - - {:else} - - - {page.value} - - - {/if} - {/each} - - - - - -{/if} + + {#snippet rows({ item })} + + {#if item.hasLogo} +
+ {item.name} logo +
+ {/if} +
+ {item.name} + + + + + {/snippet} +