diff --git a/src/lib/components/lemmy/comment/CommentActions.svelte b/src/lib/components/lemmy/comment/CommentActions.svelte index 24888259..ade42dec 100644 --- a/src/lib/components/lemmy/comment/CommentActions.svelte +++ b/src/lib/components/lemmy/comment/CommentActions.svelte @@ -30,7 +30,7 @@ const dispatcher = createEventDispatcher<{ edit: CommentView }>() -
+
@@ -89,12 +92,12 @@ dark:border-zinc-800"
diff --git a/src/lib/components/lemmy/comment/Comments.svelte b/src/lib/components/lemmy/comment/Comments.svelte index def1f66f..6e3e1fc1 100644 --- a/src/lib/components/lemmy/comment/Comments.svelte +++ b/src/lib/components/lemmy/comment/Comments.svelte @@ -3,7 +3,13 @@ import { buildCommentsTree, type CommentNodeI } from './comments' import { page } from '$app/stores' import { onMount, setContext } from 'svelte' - import { ChevronDown, Icon, Plus, PlusCircle } from 'svelte-hero-icons' + import { + ChevronDoubleDown, + ChevronDown, + Icon, + Plus, + PlusCircle, + } from 'svelte-hero-icons' import { getClient } from '$lib/lemmy.js' import type { CommentView, Post } from 'lemmy-js-client' import { fly } from 'svelte/transition' @@ -15,10 +21,6 @@ export let isParent: boolean export let post: Post - if (isParent) { - setContext('comments:tree', nodes) - } - onMount(() => { if (isParent && $page.url.hash) { document.getElementById($page.url.hash)?.scrollIntoView({ @@ -29,6 +31,7 @@ }) let loadingChildren = false + let childrenPage = 0 async function fetchChildren(parent: CommentNodeI) { if ( @@ -46,6 +49,7 @@ max_depth: 5, parent_id: parent.comment_view.comment.id, type_: 'All', + page: childrenPage, }) if (newComments.comments.length == 0) { @@ -84,6 +88,7 @@ }) } } + childrenPage++ } catch (error) { console.error(error) toast({ @@ -124,12 +129,13 @@ size="sm" color="tertiary" alignment="left" + class="font-normal" on:click={() => { node.loading = true fetchChildren(node).then(() => (node.loading = false)) }} > - + {node.comment_view.counts.child_count} more diff --git a/src/lib/components/lemmy/moderation/CommentModerationMenu.svelte b/src/lib/components/lemmy/moderation/CommentModerationMenu.svelte index 166bdb15..228b7a78 100644 --- a/src/lib/components/lemmy/moderation/CommentModerationMenu.svelte +++ b/src/lib/components/lemmy/moderation/CommentModerationMenu.svelte @@ -15,7 +15,7 @@ class="w-[26px] h-[26px] hover:!text-green-500 dark:text-zinc-400 text-slate-600" size="square-md" slot="target" - color="ghost" + color="tertiary" {...$$restProps} >