align admin dashboard settings
All checks were successful
deploy / build-and-deploy (/testvaro, /opt/website-test, website-test) (push) Successful in 15s
deploy / build-and-deploy (/varo, /opt/website, website) (push) Successful in 16s

This commit is contained in:
2025-06-16 13:05:36 +02:00
parent 019ef4d444
commit 8cc103510c

View File

@ -96,37 +96,39 @@
<div class="flex flex-col gap-5"> <div class="flex flex-col gap-5">
{#each setting.entries as entry (entry.name)} {#each setting.entries as entry (entry.name)}
<label class="flex justify-between"> <label class="flex justify-between">
<span class="mt-[.125rem] text-sm">{entry.name}</span> <span class="mt-[.125rem] text-sm w-1/2">{entry.name}</span>
{#if entry.type === 'checkbox'} <div class="w-1/2">
<input {#if entry.type === 'checkbox'}
type="checkbox" <input
class="toggle" type="checkbox"
onchange={(e) => { class="toggle"
entry.onChange(e.currentTarget.checked); onchange={(e) => {
changes = dynamicSettings.getChanges(); entry.onChange(e.currentTarget.checked);
}} changes = dynamicSettings.getChanges();
checked={entry.value} }}
/> checked={entry.value}
{:else if entry.type === 'text'} />
<input {:else if entry.type === 'text'}
type="text" <input
class="input input-bordered" type="text"
onchange={(e) => { class="input input-bordered"
entry.onChange(e.currentTarget.value); onchange={(e) => {
changes = dynamicSettings.getChanges(); entry.onChange(e.currentTarget.value);
}} changes = dynamicSettings.getChanges();
value={entry.value} }}
/> value={entry.value}
{:else if entry.type === 'textarea'} />
<textarea {:else if entry.type === 'textarea'}
class="textarea" <textarea
value={entry.value} class="textarea"
onchange={(e) => { value={entry.value}
entry.onChange(e.currentTarget.value); onchange={(e) => {
changes = dynamicSettings.getChanges(); entry.onChange(e.currentTarget.value);
}} changes = dynamicSettings.getChanges();
></textarea> }}
{/if} ></textarea>
{/if}
</div>
</label> </label>
{/each} {/each}
</div> </div>