misc: switch to CommentItem for posts
This commit is contained in:
1 parent
b0e9e898f1
commit
ef0cb48710
2 files changed
+4
-30
No files matched your search
@@ -28,7 +28,7 @@
|
|||||||
Jump
|
Jump
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<a href="/post/{getInstance()}/{comment.post.id}" class="font-bold">
|
<a href="/post/{getInstance()}/{comment.post.id}" class="font-bold text-base">
|
||||||
{comment.post.name}
|
{comment.post.name}
|
||||||
</a>
|
</a>
|
||||||
<div class="list-none">
|
<div class="list-none">
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
PencilSquare,
|
PencilSquare,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
import Button from '$lib/components/input/Button.svelte'
|
import Button from '$lib/components/input/Button.svelte'
|
||||||
|
import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte'
|
||||||
|
|
||||||
export let data: {
|
export let data: {
|
||||||
user: GetPersonDetailsResponse
|
user: GetPersonDetailsResponse
|
||||||
@@ -48,35 +49,8 @@
|
|||||||
<div class="flex flex-col-reverse lg:flex-row gap-4 max-w-full w-full">
|
<div class="flex flex-col-reverse lg:flex-row gap-4 max-w-full w-full">
|
||||||
<div class="flex flex-col gap-4 max-w-full w-full">
|
<div class="flex flex-col gap-4 max-w-full w-full">
|
||||||
{#each items as item}
|
{#each items as item}
|
||||||
{#if isComment(item)}<Card
|
{#if isComment(item)}
|
||||||
class="flex flex-col bg-white rounded-md p-5 flex-1"
|
<CommentItem comment={item} />
|
||||||
>
|
|
||||||
<div class="flex flex-row justify-between items-center">
|
|
||||||
<div class="flex flex-col gap-1">
|
|
||||||
<span class="text-xs dark:text-slate-400 text-zinc-600">
|
|
||||||
<CommunityLink avatar community={item.community} />
|
|
||||||
</span>
|
|
||||||
<span class="flex flex-row items-center text-sm font-bold">
|
|
||||||
{item.post.name}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
color="secondary"
|
|
||||||
href="/post/{item.post.id}#{item.comment.id}"
|
|
||||||
size="sm"
|
|
||||||
class="self-start"
|
|
||||||
>
|
|
||||||
Jump
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
<div class="list-none">
|
|
||||||
<Comment
|
|
||||||
postId={item.post.id}
|
|
||||||
node={{ children: [], comment_view: item, depth: 1 }}
|
|
||||||
replying={false}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
{:else}
|
{:else}
|
||||||
<Post post={item} />
|
<Post post={item} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in new issue
Block a user