diff --git a/src/lib/mono/forms/Switch.svelte b/src/lib/mono/forms/Switch.svelte index 879c4047..1f3ccb55 100644 --- a/src/lib/mono/forms/Switch.svelte +++ b/src/lib/mono/forms/Switch.svelte @@ -10,7 +10,7 @@ let { defaultValue = false, - checked = $bindable(defaultValue), + checked = $bindable(), labelClass = '', class: clazz = '', children, diff --git a/src/lib/mono/forms/TextInput.svelte b/src/lib/mono/forms/TextInput.svelte index 2ff0a0a8..a0e6954a 100644 --- a/src/lib/mono/forms/TextInput.svelte +++ b/src/lib/mono/forms/TextInput.svelte @@ -49,7 +49,7 @@ let { label = undefined, - value = $bindable(''), + value = $bindable(), placeholder = '', disabled = false, required = false, diff --git a/src/routes/admin/config/+page.svelte b/src/routes/admin/config/+page.svelte index a8ad0e5c..709ee265 100644 --- a/src/routes/admin/config/+page.svelte +++ b/src/routes/admin/config/+page.svelte @@ -82,19 +82,27 @@ >
{$t('routes.admin.config.title')}
{#if formData} - formData.name ?? '', (v) => (formData.description = v)} + label={$t('form.name')} + /> + formData.description ?? '', (v) => (formData.description = v) + } label={$t('form.description')} /> formData.sidebar ?? '', (v) => (formData.sidebar = v)} label={$t('routes.admin.config.sidebar')} /> formData.legal_information ?? '', + (v) => (formData.legal_information = v) + } label={$t('routes.legal.title')} />
diff --git a/src/routes/post/[instance]/[id=integer]/+page.svelte b/src/routes/post/[instance]/[id=integer]/+page.svelte index fdcd3dfa..9309c8a0 100644 --- a/src/routes/post/[instance]/[id=integer]/+page.svelte +++ b/src/routes/post/[instance]/[id=integer]/+page.svelte @@ -434,9 +434,12 @@ { - comments.comments.push(comment.comment_view) - reloadComments() - toast({ content: $t('routes.post.commented'), type: 'success' }) + Promise.resolve(data.comments).then((r) => { + r.comments.push(comment.comment_view) + }) + // comments.comments.push(comment.comment_view) + // reloadComments() + // toast({ content: $t('routes.post.commented'), type: 'success' }) }} locked={(data.post.post_view.post.locked && !( diff --git a/src/routes/signup/[instance]/+page.svelte b/src/routes/signup/[instance]/+page.svelte index 0ea37c77..3e1d4dfa 100644 --- a/src/routes/signup/[instance]/+page.svelte +++ b/src/routes/signup/[instance]/+page.svelte @@ -33,7 +33,7 @@ let email: string | undefined = $state('') - run(() => { + $effect(() => { if (email == '') email = undefined }) @@ -42,7 +42,7 @@ passwordVerify = $state(''), captcha: GetCaptchaResponse | null = $state(null), verifyCaptcha: string | undefined = $state(undefined), - application: string | undefined = $state(undefined), + application: string = $state(''), submitting: boolean = $state(false), honeypot: string | undefined = $state(undefined), nsfw: boolean = $state(false)