remotes/1693045480750635534/spooky-22
Aevann1 2021-09-05 21:20:32 +02:00
parent dcda4d91c8
commit 6917cc3a8f
4 changed files with 27 additions and 1 deletions

View File

@ -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)

View File

@ -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'

View File

@ -116,7 +116,7 @@
<div class="user-info">
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.id}}')"></span>
{% if last_view_utc and c.created_utc > last_view_utc and not (v and v.id==c.author_id) %}<i class="text-admin fas fa-circle" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Unread"></i>{% 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) %}<i style="color:red !important" class="text-admin fas fa-circle" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Unread"></i>{% endif %}
{% if c.awards %}
{% for a in c.awards[:5] %}

View File

@ -64,6 +64,27 @@
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="highlightcomments">Highlight New Comments</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="highlightcomments" name="highlightcomments"{% if v.highlightcomments %} checked{% endif %} onchange="post_toast('/settings/profile?highlightcomments='+document.getElementById('highlightcomments').checked);">
<label class="custom-control-label" for="highlightcomments"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to have a red dot on comments made after the last time you visited a thread.</span>
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">Website Theme</label>