From 91bff826f0f2953fbfbfae04b9c968e14fb71b86 Mon Sep 17 00:00:00 2001 From: 674Y3r <87250374+674Y3r@users.noreply.github.com> Date: Sun, 9 Jan 2022 03:50:53 +0100 Subject: [PATCH] Fix and improve admin/mod distinguishers (#386) * Fix regression with comments from deleted mods Starting with https://github.com/spikecodes/libreddit/pull/367/files comments from deleted moderators and admins(?) aren't highlighted. * Highlight mod and admin usernames in posts Works like on reddit + shows highlight for mods on the search page. --- templates/comment.html | 2 +- templates/post.html | 2 +- templates/utils.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/comment.html b/templates/comment.html index c874b9e..3014192 100644 --- a/templates/comment.html +++ b/templates/comment.html @@ -13,7 +13,7 @@ {% if author.name != "[deleted]" %} u/{{ author.name }} {% else %} - u/[deleted] + u/[deleted] {% endif %} {% if author.flair.flair_parts.len() > 0 %} {% call utils::render_flair(author.flair.flair_parts) %} diff --git a/templates/post.html b/templates/post.html index db8e083..add5881 100644 --- a/templates/post.html +++ b/templates/post.html @@ -37,7 +37,7 @@

r/{{ post.community }} - u/{{ post.author.name }} + u/{{ post.author.name }} {% if post.author.flair.flair_parts.len() > 0 %} {% call utils::render_flair(post.author.flair.flair_parts) %} {% endif %} diff --git a/templates/utils.html b/templates/utils.html index 81a4bd4..a11583f 100644 --- a/templates/utils.html +++ b/templates/utils.html @@ -72,7 +72,7 @@ {% endif -%} {{ community }} - u/{{ post.author.name }} + u/{{ post.author.name }} {{ post.rel_time }} {% if !post.awards.is_empty() %}