misc: tweak comments
This commit is contained in:
1 parent
9f91929bd2
commit
8733b9da6d
2 files changed
+11
-12
No files matched your search
@@ -19,6 +19,7 @@
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { slide } from 'svelte/transition'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
|
||||
export let node: CommentNodeI
|
||||
export let postId: number
|
||||
@@ -75,9 +76,7 @@
|
||||
{/if}
|
||||
|
||||
<li
|
||||
class="py-2 {node.depth == 0
|
||||
? 'border-b border-slate-200 dark:border-zinc-800'
|
||||
: ''} {$$props.class}"
|
||||
class="py-2 {$$props.class}"
|
||||
id="#{node.comment_view.comment.id.toString()}"
|
||||
>
|
||||
<details bind:open class="flex flex-col gap-1">
|
||||
@@ -128,11 +127,11 @@
|
||||
<Icon src={Bookmark} solid size="12" title="Saved" />
|
||||
{/if}
|
||||
</span>
|
||||
<span
|
||||
class="ml-auto translate-x-1 opacity-0
|
||||
group-hover:translate-x-0 group-hover:opacity-100 text-xs transition-all
|
||||
flex flex-row items-center gap-1 dark:bg-zinc-900 p-1 rounded-md
|
||||
bg-slate-200 hover:brightness-125 px-2"
|
||||
<Button
|
||||
class="ml-auto translate-x-1 opacity-0 group-hover:translate-x-0
|
||||
group-hover:opacity-100 text-xs !transition-all
|
||||
pointer-events-none"
|
||||
size="sm"
|
||||
>
|
||||
{#if open}
|
||||
<Icon src={Minus} width={16} height={16} mini />
|
||||
@@ -142,7 +141,7 @@
|
||||
<span class="text-xs opacity-50">+{node.children.length}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
</Button>
|
||||
</summary>
|
||||
<div
|
||||
class="flex flex-col whitespace-pre-wrap
|
||||
|
||||
@@ -98,8 +98,8 @@
|
||||
<ul
|
||||
in:fly={{ opacity: 0, y: -4 }}
|
||||
class={isParent
|
||||
? ''
|
||||
: 'mt-2 pl-3.5 border-l-2 border-slate-200 dark:border-zinc-900'}
|
||||
? 'divide-y dark:divide-zinc-800 divide-slate-200'
|
||||
: 'pl-3.5 border-l-2 border-slate-200 dark:border-zinc-800 my-1'}
|
||||
>
|
||||
{#each nodes as node (node.comment_view.comment.id)}
|
||||
<Comment
|
||||
@@ -113,7 +113,7 @@
|
||||
{/if}
|
||||
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
||||
<div
|
||||
class="my-2 min-w-[7rem] w-max h-8 border-l-2 border-slate-200 dark:border-zinc-900 pl-2"
|
||||
class="my-2 w-max h-8 border-l-2 border-slate-200 dark:border-zinc-900 pl-2"
|
||||
>
|
||||
<Button
|
||||
loading={node.loading}
|
||||
|
||||
Reference in new issue
Block a user