mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-11 18:09:03 +00:00
feat: add required indicator for required inputs (#993)
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
const formSchema = z.object({
|
||||
firstName: z.string().min(1).max(50),
|
||||
lastName: emptyToUndefined(z.string().max(50).optional()),
|
||||
displayName: z.string().max(100),
|
||||
displayName: z.string().min(1).max(100),
|
||||
username: usernameSchema,
|
||||
email: z.email(),
|
||||
isAdmin: z.boolean()
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
ldapAttributeUserUsername: z.string().min(1),
|
||||
ldapAttributeUserEmail: z.string().min(1),
|
||||
ldapAttributeUserFirstName: z.string().min(1),
|
||||
ldapAttributeUserLastName: z.string().min(1),
|
||||
ldapAttributeUserDisplayName: z.string().min(1),
|
||||
ldapAttributeUserProfilePicture: z.string(),
|
||||
ldapAttributeGroupMember: z.string(),
|
||||
ldapAttributeUserLastName: z.string().optional(),
|
||||
ldapAttributeUserDisplayName: z.string().optional(),
|
||||
ldapAttributeUserProfilePicture: z.string().optional(),
|
||||
ldapAttributeGroupMember: z.string().optional(),
|
||||
ldapAttributeGroupUniqueIdentifier: z.string().min(1),
|
||||
ldapAttributeGroupName: z.string().min(1),
|
||||
ldapAttributeAdminGroup: z.string(),
|
||||
ldapAttributeAdminGroup: z.string().optional(),
|
||||
ldapSoftDeleteUsers: z.boolean()
|
||||
});
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
<div class="grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||
<div>
|
||||
<Label for="issuer-{i}" class="text-xs">Issuer (Required)</Label>
|
||||
<Label required for="issuer-{i}" class="text-xs">Issuer</Label>
|
||||
<Input
|
||||
id="issuer-{i}"
|
||||
placeholder="https://example.com/"
|
||||
@@ -96,10 +96,10 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label for="subject-{i}" class="text-xs">Subject (Optional)</Label>
|
||||
<Label for="subject-{i}" class="text-xs">Subject</Label>
|
||||
<Input
|
||||
id="subject-{i}"
|
||||
placeholder="Defaults to the client ID: {client?.id}"
|
||||
placeholder="Defaults to the client ID"
|
||||
value={identity.subject || ''}
|
||||
oninput={(e) => updateFederatedIdentity(i, 'subject', e.currentTarget.value)}
|
||||
aria-invalid={!!getFieldError(i, 'subject')}
|
||||
@@ -110,7 +110,7 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label for="audience-{i}" class="text-xs">Audience (Optional)</Label>
|
||||
<Label for="audience-{i}" class="text-xs">Audience</Label>
|
||||
<Input
|
||||
id="audience-{i}"
|
||||
placeholder="Defaults to the Pocket ID URL"
|
||||
@@ -124,7 +124,7 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label for="jwks-{i}" class="text-xs">JWKS URL (Optional)</Label>
|
||||
<Label for="jwks-{i}" class="text-xs">JWKS URL</Label>
|
||||
<Input
|
||||
id="jwks-{i}"
|
||||
placeholder="Defaults to {identity.issuer || '<issuer>'}/.well-known/jwks.json"
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<Dialog.Title>{m.oidc_data_preview()}</Dialog.Title>
|
||||
<Dialog.Description>
|
||||
{#if user}
|
||||
{m.preview_for_user({ name: user.firstName + ' ' + user.lastName, email: user.email })}
|
||||
{m.preview_for_user({ name: user.displayName, email: user.email })}
|
||||
{:else}
|
||||
{m.preview_the_oidc_data_that_would_be_sent_for_this_user()}
|
||||
{/if}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
{selectionDisabled}
|
||||
>
|
||||
{#snippet rows({ item })}
|
||||
<Table.Cell>{item.firstName} {item.lastName}</Table.Cell>
|
||||
<Table.Cell>{item.displayName}</Table.Cell>
|
||||
<Table.Cell>{item.email}</Table.Cell>
|
||||
{/snippet}
|
||||
</AdvancedTable>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
const formSchema = z.object({
|
||||
firstName: z.string().min(1).max(50),
|
||||
lastName: emptyToUndefined(z.string().max(50).optional()),
|
||||
displayName: z.string().max(100),
|
||||
displayName: z.string().min(1).max(100),
|
||||
username: usernameSchema,
|
||||
email: z.email(),
|
||||
isAdmin: z.boolean(),
|
||||
|
||||
Reference in New Issue
Block a user