feat: allow users to hide deleted comments

Closes: #435

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
This commit is contained in:
Leonidas Spyropoulos 2023-04-21 19:47:55 +01:00
parent 174af5f025
commit 6ede837b4f
No known key found for this signature in database
GPG key ID: 59E43E106B247368
9 changed files with 132 additions and 5 deletions

View file

@ -6,6 +6,7 @@
{% endif %}
{% if not comment.Deleter or request.user.has_credential(creds.COMMENT_VIEW_DELETED, approved=[comment.Deleter]) %}
{% if not (request.user.HideDeletedComments and comment.DelTS) %}
<h4 id="comment-{{ comment.ID }}" class="{{ header_cls }}">
{% set commented_at = comment.CommentTS | dt | as_timezone(timezone) %}
{% set view_account_info = 'View account information for %s' | tr | format(comment.User.Username) %}
@ -41,3 +42,4 @@
{% include "partials/comment_content.html" %}
{% endif %}
{% endif %}