+{#if data.thread.showContext || data.thread.singleThread}
+
- {$t('routes.post.thread.part')}
+ {data.thread.showContext
+ ? $t('routes.post.thread.part')
+ : $t('routes.post.thread.single')}
-
-{:else if data.thread.singleThread}
-
-
-
- {$t('routes.post.thread.single')}
-
-
-
+
{/if}
-
+
@@ -316,10 +322,10 @@ flex-wrap gap-4 sticky top-20 w-full box-border z-20 mt-4"
{$t('routes.post.commentCount')}
-
+
{#await data.comments}
-
+
{#each new Array(10) as empty}
@@ -346,28 +352,40 @@ flex-wrap gap-4 sticky top-20 w-full box-border z-20 mt-4"
{:then comments}
{#if $profile?.jwt}
-
- (comments.comments = [
- comment.detail.comment_view,
- ...comments.comments,
- ])}
- locked={(post.post_view.post.locked &&
- !(
- $profile?.user?.local_user_view.local_user.admin ||
- $profile?.user?.moderates
- .map((c) => c.community.id)
- .includes(data.post.community_view.community.id)
- )) ||
- $page.params.instance.toLowerCase() != $instance.toLowerCase()}
- banned={data.post.community_view.banned_from_community}
- on:focus={() => (commenting = true)}
- tools={commenting}
- preview={commenting}
- placeholder={commenting ? undefined : $t('routes.post.addComment')}
- rows={commenting ? 7 : 1}
- />
+ {#if !commenting}
+
+ {:else}
+
+ (comments.comments = [
+ comment.detail.comment_view,
+ ...comments.comments,
+ ])}
+ locked={(post.post_view.post.locked &&
+ !(
+ $profile?.user?.local_user_view.local_user.admin ||
+ $profile?.user?.moderates
+ .map((c) => c.community.id)
+ .includes(data.post.community_view.community.id)
+ )) ||
+ $page.params.instance.toLowerCase() != $instance.toLowerCase()}
+ banned={data.post.community_view.banned_from_community}
+ on:focus={() => (commenting = true)}
+ tools={commenting}
+ preview={commenting}
+ placeholder={commenting ? undefined : $t('routes.post.addComment')}
+ rows={commenting ? 7 : 1}
+ />
+ {/if}
{/if}
{/if}
-
+