Apply proper styling to comments that are both new and by OP

Fixes #371.

Adds `.is-comment-by-op` class even if the comment is new or by
the current user.  This fixes the bolding of the "(OP)" tag and
preserves the colors from `new` or `mine`, which have priority
over `op` due to their ordering in `_comment.scss`.
This commit is contained in:
Aeledfyr
2023-06-06 18:39:41 -05:00
committed by Deimos
parent a2599276b2
commit 5081b86140

View File

@@ -255,7 +255,9 @@
{# done as an elif so we never mark a user's own comments as "new" #}
{% elif mark_newer_than and comment.created_time > mark_newer_than %}
{% do classes.append('is-comment-new') %}
{% elif request.has_permission('view_author', comment.topic) and request.has_permission("view", comment) and comment.user == comment.topic.user %}
{% endif %}
{% if request.has_permission('view_author', comment.topic) and request.has_permission("view", comment) and comment.user == comment.topic.user %}
{% do classes.append('is-comment-by-op') %}
{% endif %}