mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-16 19:20:17 +00:00
feat: add description to callback URL inputs
This commit is contained in:
@@ -333,5 +333,6 @@
|
|||||||
"disable_firstname_lastname": "Disable {firstName} {lastName}",
|
"disable_firstname_lastname": "Disable {firstName} {lastName}",
|
||||||
"are_you_sure_you_want_to_disable_this_user": "Are you sure you want to disable this user? They will not be able to log in or access any services.",
|
"are_you_sure_you_want_to_disable_this_user": "Are you sure you want to disable this user? They will not be able to log in or access any services.",
|
||||||
"ldap_soft_delete_users": "Keep disabled users from LDAP.",
|
"ldap_soft_delete_users": "Keep disabled users from LDAP.",
|
||||||
"ldap_soft_delete_users_description": "When enabled, users removed from LDAP will be disabled rather than deleted from the system."
|
"ldap_soft_delete_users_description": "When enabled, users removed from LDAP will be disabled rather than deleted from the system.",
|
||||||
|
"callback_url_description": "URL(s) provided by your client. Wildcards (*) are supported, but best avoided for better security."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div {...restProps}>
|
<div {...restProps}>
|
||||||
<FormInput {label}>
|
<FormInput {label} description={m.callback_url_description()}>
|
||||||
<div class="flex flex-col gap-y-2">
|
<div class="flex flex-col gap-y-2">
|
||||||
{#each callbackURLs as _, i}
|
{#each callbackURLs as _, i}
|
||||||
<div class="flex gap-x-2">
|
<div class="flex gap-x-2">
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
import FormInput from '$lib/components/form/form-input.svelte';
|
import FormInput from '$lib/components/form/form-input.svelte';
|
||||||
import { Button } from '$lib/components/ui/button';
|
import { Button } from '$lib/components/ui/button';
|
||||||
import Label from '$lib/components/ui/label/label.svelte';
|
import Label from '$lib/components/ui/label/label.svelte';
|
||||||
|
import { m } from '$lib/paraglide/messages';
|
||||||
import type {
|
import type {
|
||||||
OidcClient,
|
OidcClient,
|
||||||
OidcClientCreate,
|
OidcClientCreate,
|
||||||
@@ -12,7 +13,6 @@
|
|||||||
import { createForm } from '$lib/utils/form-util';
|
import { createForm } from '$lib/utils/form-util';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
import OidcCallbackUrlInput from './oidc-callback-url-input.svelte';
|
import OidcCallbackUrlInput from './oidc-callback-url-input.svelte';
|
||||||
import { m } from '$lib/paraglide/messages';
|
|
||||||
|
|
||||||
let {
|
let {
|
||||||
callback,
|
callback,
|
||||||
@@ -38,8 +38,8 @@
|
|||||||
|
|
||||||
const formSchema = z.object({
|
const formSchema = z.object({
|
||||||
name: z.string().min(2).max(50),
|
name: z.string().min(2).max(50),
|
||||||
callbackURLs: z.array(z.string()).nonempty(),
|
callbackURLs: z.array(z.string().nonempty()).nonempty(),
|
||||||
logoutCallbackURLs: z.array(z.string()),
|
logoutCallbackURLs: z.array(z.string().nonempty()),
|
||||||
isPublic: z.boolean(),
|
isPublic: z.boolean(),
|
||||||
pkceEnabled: z.boolean()
|
pkceEnabled: z.boolean()
|
||||||
});
|
});
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form onsubmit={onSubmit}>
|
<form onsubmit={onSubmit}>
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-x-3 gap-y-7 sm:flex-row">
|
<div class="grid grid-cols-1 gap-x-3 gap-y-7 sm:flex-row md:grid-cols-2">
|
||||||
<FormInput label={m.name()} class="w-full" bind:input={$inputs.name} />
|
<FormInput label={m.name()} class="w-full" bind:input={$inputs.name} />
|
||||||
<div></div>
|
<div></div>
|
||||||
<OidcCallbackUrlInput
|
<OidcCallbackUrlInput
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<img
|
<img
|
||||||
class="m-auto max-h-full max-w-full object-contain"
|
class="m-auto max-h-full max-w-full object-contain"
|
||||||
src={logoDataURL}
|
src={logoDataURL}
|
||||||
alt={m.name_logo({name: $inputs.name.value})}
|
alt={m.name_logo({ name: $inputs.name.value })}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user