- Migrate all DaisyUI 4 form markup (form-control, label-text, *-bordered — removed in v5) to v5 fieldset/legend; labels sat inline beside inputs and inputs fell back to a fixed 20rem width. - One Modal component (native <dialog>: Escape, focus trap) for page, event, item and slot editors; destructive actions confirmed everywhere. The page Delete confirm was ignored — returning false from onsubmit doesn't cancel — so Cancel still deleted the page. - Block editor follows the background-picker style throughout: SegmentedControl rows (title-cased options, clearer selected state) and a new ColorField row with reset; image position is Left/Right like the alignment controls. - Globals keep their layout; readable field labels, save feedback without reload, hints wrap. - Pages list: fixed broken Preview link (VITE_PUBLIC_SITE_URL was undefined → "undefined/slug"), shown for published pages only; action column no longer breaks row alignment; empty states on all tables. - Items: image picker instead of a raw media-id field, upload errors shown (were swallowed), prices in the shop currency instead of hard-coded EUR. - Slots/orders/calendar: times shown in the site timezone with a fixed locale (server and browser render the same text). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
31 lines
1.2 KiB
Svelte
31 lines
1.2 KiB
Svelte
<script lang="ts">
|
|
import type { ContentBlock, CheckoutBlockData } from '$lib/types';
|
|
|
|
let {
|
|
block,
|
|
onChange = (b: ContentBlock) => {}
|
|
} = $props<{
|
|
block: ContentBlock;
|
|
onChange?: (b: ContentBlock) => void;
|
|
}>();
|
|
|
|
function updateData(patch: Partial<CheckoutBlockData>) {
|
|
onChange({ ...block, data: { ...block.data, ...patch } });
|
|
}
|
|
</script>
|
|
|
|
<div class="space-y-4">
|
|
<label class="fieldset">
|
|
<span class="fieldset-legend">Title</span>
|
|
<input class="input w-full" value={block.data.title || ''} oninput={(e) => updateData({ title: e.currentTarget.value })} />
|
|
</label>
|
|
<label class="fieldset">
|
|
<span class="fieldset-legend">Heading</span>
|
|
<input class="input w-full" value={block.data.heading || ''} oninput={(e) => updateData({ heading: e.currentTarget.value })} />
|
|
</label>
|
|
<label class="fieldset">
|
|
<span class="fieldset-legend">Notes label</span>
|
|
<input class="input w-full" placeholder="Notes or special requests" value={block.data.notesLabel || ''} oninput={(e) => updateData({ notesLabel: e.currentTarget.value })} />
|
|
</label>
|
|
<p class="text-sm text-base-content/60">Customer fields (name, email, phone, notes) and the payment flow are fixed and cannot be changed here.</p>
|
|
</div>
|