fmt: fmt with prettier/fix errors

This commit is contained in:
James Xylight committed 2025-06-06 12:22:50 -07:00
1 parent df25431c41
commit 5928fe4792
4 files changed
+20 -18

No files matched your search

@@ -73,7 +73,7 @@
// 0.18.2 -> 0.18.3 broke this
// so i'm adding this check
const treeParent = tree.find(
(c) => c.comment_view.comment.id == parent.comment_view.comment.id,
c => c.comment_view.comment.id == parent.comment_view.comment.id,
)
if (treeParent) {
@@ -121,7 +121,7 @@
node.comment_view.counts.child_count > 0
? 'border-l'
: ''} ml-2.5 border-slate-200 dark:border-zinc-800 pl-2.5 "
bind:open={(() => node.expanded, (value) => (node.expanded = value))}
bind:open={() => node.expanded, value => (node.expanded = value)}
>
{#if node.children?.length > 0}
<Comments {post} nodes={nodes[index].children} isParent={false} />
+14 -12
View File
@@ -76,7 +76,7 @@
<form
class="flex flex-col gap-4"
onsubmit={(e) => {
onsubmit={e => {
e.preventDefault()
save()
}}
@@ -84,24 +84,26 @@
<Header pageHeader>{$t('routes.admin.config.title')}</Header>
{#if formData}
<TextInput
bind:value={(() => formData.name ?? '',
(v) => (formData.description = v))}
bind:value={() => formData.name ?? '', v => (formData.description = v)}
label={$t('form.name')}
/>
<TextInput
bind:value={(() => formData.description ?? '',
(v) => (formData.description = v))}
bind:value={
() => formData.description ?? '', v => (formData.description = v)
}
label={$t('form.description')}
/>
<MarkdownEditor
previewButton
bind:value={(() => formData.sidebar ?? '', (v) => (formData.sidebar = v))}
bind:value={() => formData.sidebar ?? '', v => (formData.sidebar = v)}
label={$t('routes.admin.config.sidebar')}
/>
<MarkdownEditor
previewButton
bind:value={(() => formData.legal_information ?? '',
(v) => (formData.legal_information = v))}
bind:value={
() => formData.legal_information ?? '',
v => (formData.legal_information = v)
}
label={$t('routes.legal.title')}
/>
<div class="flex flex-col gap-1">
@@ -125,7 +127,7 @@
<ImageUploadModal
bind:open={uploading.icon}
multiple={false}
onupload={(uploaded) => {
onupload={uploaded => {
uploading.icon = false
formData.icon = uploaded[0]
}}
@@ -153,7 +155,7 @@
<ImageUploadModal
bind:open={uploading.banner}
multiple={false}
onupload={(uploaded) => {
onupload={uploaded => {
uploading.banner = false
formData.banner = uploaded[0]
}}
@@ -255,7 +257,7 @@
</Badge>
</button>
{/snippet}
{#each site.data.all_languages.filter((l) => !formData.discussion_languages?.includes(l.id)) as language, index}
{#each site.data.all_languages.filter(l => !formData.discussion_languages?.includes(l.id)) as language, index}
<MenuButton
class="min-h-[16px] py-0"
onclick={() => {
@@ -268,7 +270,7 @@
</Menu>
{#each formData.discussion_languages ?? [] as languageId, index}
{@const language = site.data.all_languages.find(
(l) => l.id == languageId,
l => l.id == languageId,
)}
<button
type="button"
@@ -97,7 +97,7 @@
/>
<MarkdownEditor
images={false}
bind:value={(() => formData.bio ?? '', (v) => (formData.bio = v))}
bind:value={() => formData.bio ?? '', v => (formData.bio = v)}
label={$t('form.profile.bio')}
previewButton
/>
@@ -142,7 +142,7 @@
</Badge>
</button>
{/snippet}
{#each site.data.all_languages.filter((l) => !formData.discussion_languages?.includes(l.id)) as language, index}
{#each site.data.all_languages.filter(l => !formData.discussion_languages?.includes(l.id)) as language, index}
<MenuButton
class="min-h-[16px] py-0"
onclick={() => {
@@ -155,7 +155,7 @@
</Menu>
{#each formData.discussion_languages as languageId, index}
{@const language = site.data.all_languages.find(
(l) => l.id == languageId,
l => l.id == languageId,
)}
<button
type="button"