design: improve comments

This commit is contained in:
Xylight committed 2024-06-12 14:00:41 -07:00
1 parent eef339bf4c
commit 3e2ccbd220
6 files changed
+24 -18

No files matched your search

@@ -67,11 +67,13 @@
{:else if type == 'instance'}
<Search
search={async (q) => {
const results = await instances || {}
const results = (await instances) || {}
return q ? (results.federated_instances?.linked || []).filter(
(i) => i.software === 'lemmy' && i.domain.includes(q)
) : []
return q
? (results.federated_instances?.linked || []).filter(
(i) => i.software === 'lemmy' && i.domain.includes(q)
)
: []
}}
extractName={(i) => `${i.domain}`}
on:select
@@ -23,6 +23,8 @@
import { page } from '$app/stores'
import { onMount } from 'svelte'
import { t } from '$lib/translations'
import { slide } from 'svelte/transition'
import { expoOut } from 'svelte/easing'
export let node: CommentNodeI
export let postId: number
@@ -176,6 +178,7 @@
{#if replying}
<div
class="max-w-full my-2 border-l border-slate-200 dark:border-zinc-800 pl-4"
transition:slide={{ axis: 'y', duration: 400, easing: expoOut }}
>
<h1 class="font-bold text-sm mb-2">{$t('comment.reply')}</h1>
<CommentForm
@@ -142,7 +142,10 @@
}}
>
<Icon src={ChevronDoubleDown} mini size="16" slot="prefix" />
{node.comment_view.counts.child_count} more
{$t('comment.more', {
// @ts-ignore
comments: node.comment_view.counts.child_count,
})}
</Button>
</svelte:element>
{/if}