forked from MarseyWorld/MarseyWorld
comments overhaul
parent
e1e05c799d
commit
4ecb552169
|
@ -3,3 +3,8 @@
|
||||||
--black: #999;
|
--black: #999;
|
||||||
--background: 34, 34, 34;
|
--background: 34, 34, 34;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blueish {
|
||||||
|
background-color: #312e49 !important;
|
||||||
|
border-left: 10px solid #312e49 !important;
|
||||||
|
}
|
||||||
|
|
|
@ -95,3 +95,8 @@ pre {
|
||||||
h5.post-title a:visited {
|
h5.post-title a:visited {
|
||||||
color: #7a7a7a !important;
|
color: #7a7a7a !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blueish {
|
||||||
|
background-color: #312e49 !important;
|
||||||
|
border-left: 10px solid #312e49 !important;
|
||||||
|
}
|
||||||
|
|
|
@ -135,8 +135,7 @@ color: var(--gray-700);
|
||||||
background-color: var(--gray-800);
|
background-color: var(--gray-800);
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-title
|
.post-title {
|
||||||
{
|
|
||||||
color: var(--gray-300) !important;
|
color: var(--gray-300) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,3 +147,8 @@ color: var(--gray-700);
|
||||||
h5.post-title a:visited {
|
h5.post-title a:visited {
|
||||||
color: #6e6e6e !important;
|
color: #6e6e6e !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blueish {
|
||||||
|
background-color: #312e49 !important;
|
||||||
|
border-left: 10px solid #312e49 !important;
|
||||||
|
}
|
||||||
|
|
|
@ -5213,6 +5213,11 @@ span.green {
|
||||||
background-color: #964000 !important;
|
background-color: #964000 !important;
|
||||||
border-left: 10px solid #964000 !important;
|
border-left: 10px solid #964000 !important;
|
||||||
}
|
}
|
||||||
|
.blueish {
|
||||||
|
background-color: #e5e3f9 !important;
|
||||||
|
border-left: 10px solid #e5e3f9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.text-admin {
|
.text-admin {
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,3 +68,8 @@ h5.post-title a:visited {
|
||||||
.modal-content {
|
.modal-content {
|
||||||
border: 1px var(--gray-500) solid;
|
border: 1px var(--gray-500) solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blueish {
|
||||||
|
background-color: #312e49 !important;
|
||||||
|
border-left: 10px solid #312e49 !important;
|
||||||
|
}
|
||||||
|
|
|
@ -233,3 +233,8 @@
|
||||||
h5.post-title a:visited {
|
h5.post-title a:visited {
|
||||||
color: #b0b0b0 !important;
|
color: #b0b0b0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blueish {
|
||||||
|
background-color: #312e49 !important;
|
||||||
|
border-left: 10px solid #312e49 !important;
|
||||||
|
}
|
||||||
|
|
|
@ -362,7 +362,7 @@ def searchmessages(v:User):
|
||||||
next_exists = (len(comments) > PAGE_SIZE)
|
next_exists = (len(comments) > PAGE_SIZE)
|
||||||
comments = comments[:PAGE_SIZE]
|
comments = comments[:PAGE_SIZE]
|
||||||
|
|
||||||
for x in comments: x.unread = True
|
for x in comments: x.blueish = True
|
||||||
|
|
||||||
comments = [x.top_comment for x in comments]
|
comments = [x.top_comment for x in comments]
|
||||||
|
|
||||||
|
|
|
@ -1034,6 +1034,8 @@ def u_username_comments(username, v=None):
|
||||||
comments.reverse()
|
comments.reverse()
|
||||||
|
|
||||||
for x in comments:
|
for x in comments:
|
||||||
|
x.blueish = True
|
||||||
|
|
||||||
if x.replies2 == None: x.replies2 = []
|
if x.replies2 == None: x.replies2 = []
|
||||||
|
|
||||||
if x.parent_comment_id:
|
if x.parent_comment_id:
|
||||||
|
@ -1045,6 +1047,10 @@ def u_username_comments(username, v=None):
|
||||||
x.parent_comment.replies2.sort(key=lambda x: x.created_utc, reverse=True)
|
x.parent_comment.replies2.sort(key=lambda x: x.created_utc, reverse=True)
|
||||||
|
|
||||||
x = x.parent_comment
|
x = x.parent_comment
|
||||||
|
|
||||||
|
if x.author_id == u.id:
|
||||||
|
x.blueish = True
|
||||||
|
|
||||||
if x.id in old_ids: continue
|
if x.id in old_ids: continue
|
||||||
ids.add(x.id)
|
ids.add(x.id)
|
||||||
|
|
||||||
|
@ -1073,9 +1079,11 @@ def u_username_comments(username, v=None):
|
||||||
@limiter.limit(DEFAULT_RATELIMIT)
|
@limiter.limit(DEFAULT_RATELIMIT)
|
||||||
@auth_desired_with_logingate
|
@auth_desired_with_logingate
|
||||||
def profile_more_comments(v, cid, username):
|
def profile_more_comments(v, cid, username):
|
||||||
|
uid = get_user(username).id
|
||||||
|
|
||||||
comments = g.db.query(Comment).filter(
|
comments = g.db.query(Comment).filter(
|
||||||
Comment.top_comment_id == get_comment(cid).top_comment_id,
|
Comment.top_comment_id == get_comment(cid).top_comment_id,
|
||||||
Comment.author_id == get_user(username).id,
|
Comment.author_id == uid,
|
||||||
Comment.level > 9,
|
Comment.level > 9,
|
||||||
).all()
|
).all()
|
||||||
|
|
||||||
|
@ -1083,6 +1091,8 @@ def profile_more_comments(v, cid, username):
|
||||||
ids = set()
|
ids = set()
|
||||||
|
|
||||||
for x in comments:
|
for x in comments:
|
||||||
|
x.blueish = True
|
||||||
|
|
||||||
while x.parent_comment_id != cid and x.level > 9:
|
while x.parent_comment_id != cid and x.level > 9:
|
||||||
if x.id in ids: break
|
if x.id in ids: break
|
||||||
ids.add(x.id)
|
ids.add(x.id)
|
||||||
|
@ -1093,6 +1103,9 @@ def profile_more_comments(v, cid, username):
|
||||||
|
|
||||||
x = x.parent_comment
|
x = x.parent_comment
|
||||||
|
|
||||||
|
if x.author_id == uid:
|
||||||
|
x.blueish = True
|
||||||
|
|
||||||
ids.add(x.id)
|
ids.add(x.id)
|
||||||
|
|
||||||
if x not in listing and x.parent_comment_id == cid:
|
if x not in listing and x.parent_comment_id == cid:
|
||||||
|
|
|
@ -113,15 +113,13 @@
|
||||||
{% set isreply = False %}
|
{% set isreply = False %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set highlight_for_profile = request.path.startswith('/@') and request.path.endswith('/comments') and u and c.author_id == u.id %}
|
|
||||||
|
|
||||||
<div id="comment-{{c.id}}" class="anchor comment {% if wall %}mt-4{% elif standalone and level==1 %}mt-0{% endif %} {% if collapse or c.collapse_for_user(v,request.full_path) %}collapsed{% endif %}" style="{% if isreply %}padding-left:0!important{% endif %}">
|
<div id="comment-{{c.id}}" class="anchor comment {% if wall %}mt-4{% elif standalone and level==1 %}mt-0{% endif %} {% if collapse or c.collapse_for_user(v,request.full_path) %}collapsed{% endif %}" style="{% if isreply %}padding-left:0!important{% endif %}">
|
||||||
{% if not isreply %}
|
{% if not isreply %}
|
||||||
<span class="comment-collapse-desktop" style="border-left: 2px solid {% if c.ghost %}var(--primary){% else %}#{{c.author.name_color}}{% endif %}" data-nonce="{{g.nonce}}" data-onclick="collapse_comment('{{c.id}}')"></span>
|
<span class="comment-collapse-desktop" style="border-left: 2px solid {% if c.ghost %}var(--primary){% else %}#{{c.author.name_color}}{% endif %}" data-nonce="{{g.nonce}}" data-onclick="collapse_comment('{{c.id}}')"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="comment-body">
|
<div class="comment-body">
|
||||||
|
|
||||||
<div id="{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.id}}-only{% endif %}" class="{% if c.award_count('tilt', v) %}tilt tilt-{{c.award_count('tilt', v)}}{% endif %} {% if c.unread or highlight_for_profile %}unread{% endif %} {% if c.award_count('glowie', v) %}glow{% endif %} comment-{{c.id}}-only comment-anchor {% if comment_info and comment_info.id == c.id %}context{%endif%}{% if c.is_banned %} banned{% endif %}{% if c.deleted_utc %} deleted{% endif %}">
|
<div id="{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.id}}-only{% endif %}" class="{% if c.award_count('tilt', v) %}tilt tilt-{{c.award_count('tilt', v)}}{% endif %} {% if c.blueish %}blueish{% elif c.unread %}unread{% endif %} {% if c.award_count('glowie', v) %}glow{% endif %} comment-{{c.id}}-only comment-anchor {% if comment_info and comment_info.id == c.id %}context{%endif%}{% if c.is_banned %} banned{% endif %}{% if c.deleted_utc %} deleted{% endif %}">
|
||||||
|
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<span class="comment-collapse-icon" data-nonce="{{g.nonce}}" data-onclick="collapse_comment('{{c.id}}')"></span>
|
<span class="comment-collapse-icon" data-nonce="{{g.nonce}}" data-onclick="collapse_comment('{{c.id}}')"></span>
|
||||||
|
|
Loading…
Reference in New Issue