fmt: fmt with prettier/fix errors
This commit is contained in:
4 files changed
+20
-18
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"arrowParens": "always",
|
"arrowParens": "avoid",
|
||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
"semi": false,
|
"semi": false,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
// 0.18.2 -> 0.18.3 broke this
|
// 0.18.2 -> 0.18.3 broke this
|
||||||
// so i'm adding this check
|
// so i'm adding this check
|
||||||
const treeParent = tree.find(
|
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) {
|
if (treeParent) {
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
node.comment_view.counts.child_count > 0
|
node.comment_view.counts.child_count > 0
|
||||||
? 'border-l'
|
? 'border-l'
|
||||||
: ''} ml-2.5 border-slate-200 dark:border-zinc-800 pl-2.5 "
|
: ''} 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}
|
{#if node.children?.length > 0}
|
||||||
<Comments {post} nodes={nodes[index].children} isParent={false} />
|
<Comments {post} nodes={nodes[index].children} isParent={false} />
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
<form
|
<form
|
||||||
class="flex flex-col gap-4"
|
class="flex flex-col gap-4"
|
||||||
onsubmit={(e) => {
|
onsubmit={e => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
save()
|
save()
|
||||||
}}
|
}}
|
||||||
@@ -84,24 +84,26 @@
|
|||||||
<Header pageHeader>{$t('routes.admin.config.title')}</Header>
|
<Header pageHeader>{$t('routes.admin.config.title')}</Header>
|
||||||
{#if formData}
|
{#if formData}
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={(() => formData.name ?? '',
|
bind:value={() => formData.name ?? '', v => (formData.description = v)}
|
||||||
(v) => (formData.description = v))}
|
|
||||||
label={$t('form.name')}
|
label={$t('form.name')}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={(() => formData.description ?? '',
|
bind:value={
|
||||||
(v) => (formData.description = v))}
|
() => formData.description ?? '', v => (formData.description = v)
|
||||||
|
}
|
||||||
label={$t('form.description')}
|
label={$t('form.description')}
|
||||||
/>
|
/>
|
||||||
<MarkdownEditor
|
<MarkdownEditor
|
||||||
previewButton
|
previewButton
|
||||||
bind:value={(() => formData.sidebar ?? '', (v) => (formData.sidebar = v))}
|
bind:value={() => formData.sidebar ?? '', v => (formData.sidebar = v)}
|
||||||
label={$t('routes.admin.config.sidebar')}
|
label={$t('routes.admin.config.sidebar')}
|
||||||
/>
|
/>
|
||||||
<MarkdownEditor
|
<MarkdownEditor
|
||||||
previewButton
|
previewButton
|
||||||
bind:value={(() => formData.legal_information ?? '',
|
bind:value={
|
||||||
(v) => (formData.legal_information = v))}
|
() => formData.legal_information ?? '',
|
||||||
|
v => (formData.legal_information = v)
|
||||||
|
}
|
||||||
label={$t('routes.legal.title')}
|
label={$t('routes.legal.title')}
|
||||||
/>
|
/>
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
@@ -125,7 +127,7 @@
|
|||||||
<ImageUploadModal
|
<ImageUploadModal
|
||||||
bind:open={uploading.icon}
|
bind:open={uploading.icon}
|
||||||
multiple={false}
|
multiple={false}
|
||||||
onupload={(uploaded) => {
|
onupload={uploaded => {
|
||||||
uploading.icon = false
|
uploading.icon = false
|
||||||
formData.icon = uploaded[0]
|
formData.icon = uploaded[0]
|
||||||
}}
|
}}
|
||||||
@@ -153,7 +155,7 @@
|
|||||||
<ImageUploadModal
|
<ImageUploadModal
|
||||||
bind:open={uploading.banner}
|
bind:open={uploading.banner}
|
||||||
multiple={false}
|
multiple={false}
|
||||||
onupload={(uploaded) => {
|
onupload={uploaded => {
|
||||||
uploading.banner = false
|
uploading.banner = false
|
||||||
formData.banner = uploaded[0]
|
formData.banner = uploaded[0]
|
||||||
}}
|
}}
|
||||||
@@ -255,7 +257,7 @@
|
|||||||
</Badge>
|
</Badge>
|
||||||
</button>
|
</button>
|
||||||
{/snippet}
|
{/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
|
<MenuButton
|
||||||
class="min-h-[16px] py-0"
|
class="min-h-[16px] py-0"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
@@ -268,7 +270,7 @@
|
|||||||
</Menu>
|
</Menu>
|
||||||
{#each formData.discussion_languages ?? [] as languageId, index}
|
{#each formData.discussion_languages ?? [] as languageId, index}
|
||||||
{@const language = site.data.all_languages.find(
|
{@const language = site.data.all_languages.find(
|
||||||
(l) => l.id == languageId,
|
l => l.id == languageId,
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
/>
|
/>
|
||||||
<MarkdownEditor
|
<MarkdownEditor
|
||||||
images={false}
|
images={false}
|
||||||
bind:value={(() => formData.bio ?? '', (v) => (formData.bio = v))}
|
bind:value={() => formData.bio ?? '', v => (formData.bio = v)}
|
||||||
label={$t('form.profile.bio')}
|
label={$t('form.profile.bio')}
|
||||||
previewButton
|
previewButton
|
||||||
/>
|
/>
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
</Badge>
|
</Badge>
|
||||||
</button>
|
</button>
|
||||||
{/snippet}
|
{/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
|
<MenuButton
|
||||||
class="min-h-[16px] py-0"
|
class="min-h-[16px] py-0"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
</Menu>
|
</Menu>
|
||||||
{#each formData.discussion_languages as languageId, index}
|
{#each formData.discussion_languages as languageId, index}
|
||||||
{@const language = site.data.all_languages.find(
|
{@const language = site.data.all_languages.find(
|
||||||
(l) => l.id == languageId,
|
l => l.id == languageId,
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
Reference in new issue
Block a user