diff --git a/src/routes/events/[event_id]/(badges)/templates/ae_comp__badge_template_form.svelte b/src/routes/events/[event_id]/(badges)/templates/ae_comp__badge_template_form.svelte index 79367caf..fa2ef6f5 100644 --- a/src/routes/events/[event_id]/(badges)/templates/ae_comp__badge_template_form.svelte +++ b/src/routes/events/[event_id]/(badges)/templates/ae_comp__badge_template_form.svelte @@ -86,6 +86,8 @@ let cfg_punch_holes_right_rainbow = $state(false); let cfg_punch_holes_center_fg = $state(''); let cfg_punch_holes_center_bg = $state(''); let cfg_punch_holes_center_rainbow = $state(false); +// Horizontal inset per side (mm). null = use component default (2mm). +let cfg_punch_holes_inset_x_mm: number | null = $state(null); // Applies to all rainbow slots: slow breathing pulse instead of fast cycle let cfg_punch_holes_slow_pulse = $state(false); // Header bottom border. Empty color = no border. @@ -200,6 +202,7 @@ async function load_template(id: string) { cfg_punch_holes_center_bg = parsed_cfg?.punch_holes?.center_bg ?? ''; cfg_punch_holes_center_rainbow = parsed_cfg?.punch_holes?.center_rainbow ?? false; cfg_punch_holes_slow_pulse = parsed_cfg?.punch_holes?.slow_pulse ?? false; + cfg_punch_holes_inset_x_mm = parsed_cfg?.punch_holes?.inset_x_mm ?? null; cfg_header_border_color = parsed_cfg.header_border_color ?? ''; cfg_header_border_width = parsed_cfg.header_border_width ?? ''; cfg_header_padding_top = parsed_cfg.header_padding_top ?? ''; @@ -301,6 +304,7 @@ async function handle_submit() { if (cfg_punch_holes_center_bg.trim()) ph.center_bg = cfg_punch_holes_center_bg.trim(); if (cfg_punch_holes_center_rainbow) ph.center_rainbow = true; if (cfg_punch_holes_slow_pulse) ph.slow_pulse = true; + if (cfg_punch_holes_inset_x_mm !== null && !isNaN(cfg_punch_holes_inset_x_mm)) ph.inset_x_mm = cfg_punch_holes_inset_x_mm; cfg_obj.punch_holes = ph; } else { delete cfg_obj.punch_holes; @@ -488,6 +492,41 @@ function toggle_cfg_controls_auth_editable(key: string) { Slow Pulse (gentle breathing instead of fast cycle) {/if} + + {#if cfg_punch_holes_left || cfg_punch_holes_right || cfg_punch_holes_center} +
+ +
+ {/if}