feat: update some more components to svelte 5
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m48s

This commit is contained in:
Max Richter
2025-11-24 21:11:16 +01:00
parent d64877666b
commit cfcb447784
17 changed files with 130 additions and 80 deletions

View File

@@ -77,13 +77,13 @@
let internalValue = $state(getDefaultValue());
let open = $state(openSections[id]);
let open = $state(openSections.value[id]);
// Persist <details> open/closed state for groups
if (depth > 0 && !isNodeInput(type[key!])) {
$effect(() => {
if (open !== undefined) {
openSections[id] = open;
openSections.value[id] = open;
}
});
}
@@ -110,7 +110,7 @@
<!-- Leaf input -->
<div class="input input-{type[key].type}" class:first-level={depth === 1}>
{#if type[key].type === "button"}
<button onclick={() => console.log(type[key])}>
<button onclick={() => type[key].callback()}>
{type[key].label || key}
</button>
{:else}
@@ -124,7 +124,7 @@
<NestedSettings
id={`${id}.${childKey}`}
key={childKey}
{value}
bind:value
{type}
depth={depth + 1}
/>
@@ -142,7 +142,7 @@
<NestedSettings
id={`${id}.${childKey}`}
key={childKey}
value={value[key] as SettingsValue}
bind:value={value[key] as SettingsValue}
type={type[key] as unknown as SettingsType}
depth={depth + 1}
/>