post-reply soft-deletion: collapse deleted comments in post view

This commit is contained in:
freamon 2024-10-19 16:06:03 +00:00
parent 9e80066d2a
commit 9ef5aeecb3

View file

@ -80,7 +80,7 @@
aria-level="{{ comment['comment'].depth + 1 }}" role="treeitem" aria-expanded="true" tabindex="0">
<div class="limit_height">{% if not comment['comment'].author.indexable -%}<!--googleoff: all-->{% endif -%}
<div class="comment_author">
{% with collapsed = comment['comment'].score < reply_collapse_threshold -%}
{% with collapsed = (comment['comment'].score < reply_collapse_threshold or comment['comment'].deleted) -%}
{{ render_username(comment['comment'].author) }}
{% endwith -%}
{% if comment['comment'].author.id == post.author.id -%}<span title="Submitter of original post" aria-label="{{ _('Post creator') }}" class="small">[OP] </span>{% endif -%}
@ -112,7 +112,7 @@
{% endwith -%}
</div>
<div class="hide_button">
{% if comment['comment'].score <= reply_collapse_threshold -%}
{% if comment['comment'].score <= reply_collapse_threshold or comment['comment'].deleted -%}
<a href='#'><span class="fe fe-expand"></span></a>
{% else -%}
<a href='#'><span class="fe fe-collapse"></span></a>
@ -140,7 +140,7 @@
{% endif -%}
{% endif -%}
</div>
{% if comment['comment'].score <= reply_collapse_threshold -%}
{% if comment['comment'].score <= reply_collapse_threshold or comment['comment'].deleted -%}
<script nonce="{{ session['nonce'] }}" type="text/javascript">
toBeHidden.push({{ comment['comment'].id }});
</script>