Admin: one image picker everywhere, with paste, drag-and-drop and a library #12

Merged
reudy merged 4 commits from unified-image-picker into main 2026-10-26 18:01:18 +01:00
Showing only changes of commit bc62bdf8dd - Show all commits

View file

@ -167,16 +167,16 @@
</div>
{#if withUrl || altHint}
<div class="min-w-0 space-y-3">
<div class="min-w-0">
{#if altHint}
<label class="flex flex-col gap-1 @sm:flex-row @sm:items-center @sm:gap-3">
<span class="w-24 shrink-0 text-sm font-medium">Alt text</span>
<label class="fieldset pt-0">
<span class="fieldset-legend pt-0">Alt text</span>
<input class="input w-full" value={alt} placeholder={altHint} title={altHint} bind:this={altInput} oninput={(e) => onChange({ url, alt: e.currentTarget.value })} />
</label>
{/if}
{#if withUrl}
<label class="flex flex-col gap-1 @sm:flex-row @sm:items-center @sm:gap-3">
<span class="w-24 shrink-0 text-sm font-medium">Image URL</span>
<label class="fieldset {altHint ? '' : 'pt-0'}">
<span class="fieldset-legend {altHint ? '' : 'pt-0'}">Image URL</span>
<input class="input w-full text-base-content/70" value={url} placeholder="Filled in by an upload, or https://…" oninput={(e) => onChange({ url: e.currentTarget.value, alt, id: '' })} />
</label>
{/if}