mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-29 03:59:04 +01:00
feat: add description field to oidc clients (#1547)
Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
co-authored by
Elias Schneider
parent
c85a4e63da
commit
6734585712
@@ -3,6 +3,7 @@ import type { UserGroup } from './user-group.type';
|
||||
export type OidcClientMetaData = {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
hasLogo: boolean;
|
||||
hasDarkLogo: boolean;
|
||||
requiresReauthentication: boolean;
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
const client = {
|
||||
id: '',
|
||||
name: existingClient?.name || '',
|
||||
description: existingClient?.description || '',
|
||||
callbackURLs: existingClient?.callbackURLs || [],
|
||||
logoutCallbackURLs: existingClient?.logoutCallbackURLs || [],
|
||||
isPublic: existingClient?.isPublic || false,
|
||||
@@ -73,6 +74,7 @@
|
||||
.optional()
|
||||
),
|
||||
name: z.string().min(2).max(50),
|
||||
description: z.string().max(150),
|
||||
callbackURLs: z.array(callbackUrlSchema).default([]),
|
||||
logoutCallbackURLs: z.array(callbackUrlSchema).default([]),
|
||||
isPublic: z.boolean(),
|
||||
@@ -186,6 +188,12 @@
|
||||
description={m.client_name_description()}
|
||||
bind:input={$inputs.name}
|
||||
/>
|
||||
<FormInput
|
||||
label={m.client_description()}
|
||||
class="w-full"
|
||||
description={m.client_description_description()}
|
||||
bind:input={$inputs.description}
|
||||
/>
|
||||
<FormInput
|
||||
label={m.client_launch_url()}
|
||||
description={m.client_launch_url_description()}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</script>
|
||||
|
||||
<Card.Root
|
||||
class="border-muted group relative h-[140px] p-5 transition-all duration-200 hover:shadow-md sm:max-w-[50vw] md:max-w-[400px]"
|
||||
class="border-muted group relative h-[160px] p-5 transition-all duration-200 hover:shadow-md sm:max-w-[50vw] md:max-w-[400px]"
|
||||
data-testid="authorized-oidc-client-card"
|
||||
>
|
||||
<Card.Content class=" p-0">
|
||||
@@ -46,21 +46,28 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="flex w-full justify-between gap-3">
|
||||
<div>
|
||||
<div class="h-20">
|
||||
<div class="mb-1 flex items-start gap-2">
|
||||
<h3
|
||||
class="text-foreground line-clamp-2 leading-tight font-semibold break-words break-all text-ellipsis"
|
||||
class="text-foreground line-clamp-2 leading-tight font-semibold wrap-break-word break-all text-ellipsis"
|
||||
>
|
||||
{client.name}
|
||||
</h3>
|
||||
</div>
|
||||
{#if client.launchURL}
|
||||
<p
|
||||
class="text-muted-foreground line-clamp-1 text-xs break-words break-all text-ellipsis"
|
||||
class="text-muted-foreground line-clamp-1 text-xs wrap-break-word break-all text-ellipsis"
|
||||
>
|
||||
{new URL(client.launchURL).hostname}
|
||||
</p>
|
||||
{/if}
|
||||
{#if client.description}
|
||||
<p
|
||||
class="text-muted-foreground line-clamp-3 wrap-break-word text-ellipsis text-xs mt-1"
|
||||
>
|
||||
{client.description}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
{#if $userStore?.isAdmin || client.lastUsedAt}
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user