From 6917cc3a8f5c790da1f13b21a3d5c171d2b30644 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 5 Sep 2021 21:20:32 +0200 Subject: [PATCH] fd --- files/classes/user.py | 1 + files/routes/settings.py | 4 ++++ files/templates/comments.html | 2 +- files/templates/settings_profile.html | 21 +++++++++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/files/classes/user.py b/files/classes/user.py index de85c1392..e35389fc4 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -67,6 +67,7 @@ class User(Base, Stndrd, Age_times): shadowbanned = Column(Boolean, default=False) over_18 = Column(Boolean, default=False) hidevotedon = Column(Boolean, default=False) + highlightcomments = Column(Boolean, default=True) slurreplacer = Column(Boolean, default=True) flairchanged = Column(Boolean, default=False) newtab = Column(Boolean, default=False) diff --git a/files/routes/settings.py b/files/routes/settings.py index d7e3faaff..c579774cc 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -62,6 +62,10 @@ def settings_profile_post(v): updated = True v.cardview = request.values.get("cardview", None) == 'true' + if request.values.get("highlightcomments", v.highlightcomments) != v.highlightcomments: + updated = True + v.highlightcomments = request.values.get("highlightcomments", None) == 'true' + if request.values.get("newtab", v.newtab) != v.newtab: updated = True v.newtab = request.values.get("newtab", None) == 'true' diff --git a/files/templates/comments.html b/files/templates/comments.html index 7a72bce64..845de0c56 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -116,7 +116,7 @@
- {% if last_view_utc and c.created_utc > last_view_utc and not (v and v.id==c.author_id) %}{% endif %} + {% if last_view_utc and c.created_utc > last_view_utc and not (v and v.id==c.author_id) and (not v or v.highlightcomments) %}{% endif %} {% if c.awards %} {% for a in c.awards[:5] %} diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 27df422c0..e0d76e553 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -64,6 +64,27 @@
+ +
+ +
+ +
+ +
+ +
+ + +
+ + Enable if you would like to have a red dot on comments made after the last time you visited a thread. + +
+ +
+ +