1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 11:36:46 +00:00

fix: add type="url" to url inputs

This commit is contained in:
Elias Schneider
2026-01-24 17:37:54 +01:00
parent 80558c5625
commit bb7b0d5608
4 changed files with 4 additions and 1 deletions

View File

@@ -41,7 +41,7 @@
placeholder?: string; placeholder?: string;
disabled?: boolean; disabled?: boolean;
inputClass?: string; inputClass?: string;
type?: 'text' | 'password' | 'email' | 'number' | 'checkbox' | 'date'; type?: 'text' | 'password' | 'email' | 'number' | 'checkbox' | 'date' | 'url';
onInput?: (e: FormInputEvent) => void; onInput?: (e: FormInputEvent) => void;
} = $props(); } = $props();

View File

@@ -74,6 +74,7 @@
oninput={(e) => (url = e.currentTarget.value)} oninput={(e) => (url = e.currentTarget.value)}
onfocusout={handleUrlChange} onfocusout={handleUrlChange}
aria-invalid={hasError} aria-invalid={hasError}
type="url"
/> />
{#if hasError} {#if hasError}
<p class="text-destructive mt-1 text-start text-xs">{m.invalid_url()}</p> <p class="text-destructive mt-1 text-start text-xs">{m.invalid_url()}</p>

View File

@@ -31,6 +31,7 @@
<Input <Input
aria-invalid={!!error} aria-invalid={!!error}
data-testid={`callback-url-${i + 1}`} data-testid={`callback-url-${i + 1}`}
type="url"
bind:value={callbackURLs[i]} bind:value={callbackURLs[i]}
/> />
<Button <Button

View File

@@ -181,6 +181,7 @@
label={m.client_launch_url()} label={m.client_launch_url()}
description={m.client_launch_url_description()} description={m.client_launch_url_description()}
class="w-full" class="w-full"
type="url"
bind:input={$inputs.launchURL} bind:input={$inputs.launchURL}
/> />
<OidcCallbackUrlInput <OidcCallbackUrlInput