From 5081b8614084e4b1e00f6d450e344874d8b44690 Mon Sep 17 00:00:00 2001 From: Aeledfyr Date: Tue, 6 Jun 2023 18:39:41 -0500 Subject: [PATCH] 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`. --- tildes/tildes/templates/macros/comments.jinja2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tildes/tildes/templates/macros/comments.jinja2 b/tildes/tildes/templates/macros/comments.jinja2 index 353d27f..1bec7e4 100644 --- a/tildes/tildes/templates/macros/comments.jinja2 +++ b/tildes/tildes/templates/macros/comments.jinja2 @@ -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 %}