Merge branch 'master' into mistletoe

master
kek7198 2021-12-05 20:17:30 -06:00
commit e15893f53d
22 changed files with 128 additions and 103 deletions

View File

@ -50,6 +50,7 @@ class Submission(Base):
url = Column(String)
body = Column(String)
body_html = Column(String)
flair = Column(String)
ban_reason = Column(String)
embed_url = Column(String)
@ -213,11 +214,11 @@ class Submission(Base):
@property
@lazy
def thumb_url(self):
if self.over_18: return f"http://{site}/assets/images/nsfw.webp"
elif not self.url: return f"http://{site}/assets/images/{site_name}/default_text.webp"
if self.over_18: return f"https://{site}/assets/images/nsfw.webp"
elif not self.url: return f"https://{site}/assets/images/{site_name}/default_text.webp"
elif self.thumburl: return self.thumburl
elif "youtu.be" in self.domain or "youtube.com" == self.domain: return f"http://{site}/assets/images/default_thumb_yt.webp"
else: return f"http://{site}/assets/images/default_thumb_link.webp"
elif "youtu.be" in self.domain or "youtube.com" == self.domain: return f"https://{site}/assets/images/default_thumb_yt.webp"
else: return f"https://{site}/assets/images/default_thumb_link.webp"
@property
@lazy
@ -336,6 +337,7 @@ class Submission(Base):
rand = random.randint(0, maxupvotes)
if self.upvotes < rand:
amount = random.randint(0, 3)
self.views += amount*random.randint(3, 5)
self.upvotes += amount
g.db.add(self)
self.author.coins += amount

View File

@ -411,15 +411,15 @@ class User(Base):
@lazy
def banner_url(self):
if self.bannerurl: return self.bannerurl
else: return f"http://{site}/assets/images/{site_name}/preview.webp?v=3"
else: return f"https://{site}/assets/images/{site_name}/preview.webp?v=3"
@property
@lazy
def profile_url(self):
if self.agendaposter: return f"http://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=1"
if self.agendaposter: return f"https://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=1"
if self.profileurl: return self.profileurl
if "rama" in site: return f"http://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=1"
return f"http://{site}/assets/images/default-profile-pic.webp"
if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=1"
return f"https://{site}/assets/images/default-profile-pic.webp"
@property
@lazy

View File

@ -148,6 +148,7 @@ if SITE == 'rdrama.net':
LLM_ID = 253
DAD_ID = 2513
MOM_ID = 4588
BUG_THREAD = 18459
elif SITE == "pcmemes.net":
BASEDBOT_ID = 800
KIPPY_ID = 1592
@ -168,6 +169,7 @@ elif SITE == "pcmemes.net":
LLM_ID = 0
DAD_ID = 0
MOM_ID = 0
BUG_THREAD = 4103
else:
BASEDBOT_ID = 0
KIPPY_ID = 0
@ -188,6 +190,7 @@ else:
LLM_ID = 0
DAD_ID = 0
MOM_ID = 0
BUG_THREAD = 0
PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6'
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()

View File

@ -216,7 +216,7 @@ def get_comment(i, v=None, graceful=False):
return comment
def get_comments(cids, v=None, load_parent=False):
def get_comments(cids, v=None, load_parent=False, shadowbanned=False):
if not cids: return []
@ -235,8 +235,8 @@ def get_comments(cids, v=None, load_parent=False):
blocking.c.id,
blocked.c.id,
).filter(Comment.id.in_(cids))
if not (v and v.shadowbanned) and not (v and v.admin_level > 1):
if not shadowbanned and not v.shadowbanned and v.admin_level < 2:
comments = comments.join(User, User.id == Comment.author_id).filter(User.shadowbanned == None)
comments = comments.join(

View File

@ -182,7 +182,7 @@ def sanitize(sanitized, noimages=False):
remoji = emoji
if path.isfile(f'./files/assets/images/emojis/{remoji}.webp'):
new = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" {classes}src="http://{site}/assets/images/emojis/{remoji}.webp" >', new)
new = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" {classes}src="https://{site}/assets/images/emojis/{remoji}.webp" >', new)
if remoji in session["favorite_emojis"]: session["favorite_emojis"][remoji] += 1
else: session["favorite_emojis"][remoji] = 1
@ -195,13 +195,13 @@ def sanitize(sanitized, noimages=False):
if emoji.startswith("!"):
emoji = emoji[1:]
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
sanitized = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" class="emoji mirrored" src="http://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
sanitized = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" class="emoji mirrored" src="https://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
else: session["favorite_emojis"][emoji] = 1
elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
sanitized = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" class="emoji" src="http://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
sanitized = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" class="emoji" src="https://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
else: session["favorite_emojis"][emoji] = 1
@ -265,10 +265,10 @@ def filter_title(title):
if emoji.startswith("!"):
emoji = emoji[1:]
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
title = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=30 src="http://{site}/assets/images/emojis/{emoji}.webp" class="mirrored">', title)
title = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=30 src="https://{site}/assets/images/emojis/{emoji}.webp" class="mirrored">', title)
elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
title = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=30 src="http://{site}/assets/images/emojis/{emoji}.webp">', title)
title = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=30 src="https://{site}/assets/images/emojis/{emoji}.webp">', title)
if len(title) > 1500: abort(400)
else: return title

View File

@ -565,7 +565,7 @@ def api_comment(v):
'notification': {
'title': f'New reply by @{v.username}',
'body': c.body,
'deep_link': f'http://{site}/comment/{c.id}?context=9&read=true#context',
'deep_link': f'https://{site}/comment/{c.id}?context=9&read=true#context',
},
},
},

View File

@ -51,7 +51,7 @@ def feeds_user(sort='hot', t='all'):
with tag("name"):
text(post.author.username)
with tag("uri"):
text(f'http://{site}/@{post.author.username}')
text(f'https://{site}/@{post.author.username}')
doc.stag("link", href=full_link(post.permalink))

View File

@ -367,7 +367,7 @@ def random_post(v):
return redirect(f"/post/{post.id}")
@cache.memoize(timeout=86400)
def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all"):
def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all", shadowbanned=False):
posts = g.db.query(Submission)
cc_idlist = [x[0] for x in g.db.query(Submission.id).filter(Submission.club == True).all()]
@ -415,6 +415,7 @@ def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all"):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
if shadowbanned: comments = comments.join(User, User.id == Comment.author_id).filter(User.shadowbanned != None)
comments = comments.offset(25 * (page - 1)).limit(26).all()
return [x[0] for x in comments]
@ -428,17 +429,20 @@ def all_comments(v):
sort=request.values.get("sort", "new")
t=request.values.get("t", defaulttimefilter)
if request.values.get("shadowbanned") and v and v.admin_level > 1: shadowbanned = True
else: shadowbanned = False
idlist = comment_idlist(v=v,
page=page,
sort=sort,
t=t,
)
comments = get_comments(idlist, v=v)
shadowbanned=shadowbanned
)
comments = get_comments(idlist, v=v, shadowbanned=shadowbanned)
next_exists = len(idlist) > 25
idlist = idlist[:25]
if request.headers.get("Authorization"): return {"data": [x.json for x in comments]}
else: return render_template("home_comments.html", v=v, sort=sort, t=t, page=page, comments=comments, standalone=True, next_exists=next_exists)
else: return render_template("home_comments.html", v=v, sort=sort, t=t, page=page, comments=comments, standalone=True, next_exists=next_exists, shadowbanned=shadowbanned)

View File

@ -62,12 +62,12 @@ def publish(pid, v):
user = g.db.query(User).filter_by(username=username).first()
if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id)
for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{post.permalink}")
for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: https://{site}{post.permalink}")
for follow in v.followers:
user = get_account(follow.user_id)
if post.club and not user.club_allowed: continue
send_notification(user.id, f"@{v.username} has made a new post: [{post.title}](http://{site}{post.permalink})", True)
send_notification(user.id, f"@{v.username} has made a new post: [{post.title}](https://{site}{post.permalink})", True)
cache.delete_memoized(frontlist)
@ -169,9 +169,6 @@ def post_id(pid, anything=None, v=None):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
offset = int(request.values.get("offset", 0))
if offset: comments = comments.offset(offset)
comments = [c[0] for c in comments.all()]
else:
pinned = g.db.query(Comment).filter(Comment.parent_submission == post.id, Comment.is_pinned != None).all()
@ -189,27 +186,28 @@ def post_id(pid, anything=None, v=None):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
offset = 0
comments = comments.all()
comments2 = []
count = 0
if post.created_utc > 1638672040:
for comment in comments:
comments2.append(comment)
count += g.db.query(Comment.id).filter_by(parent_submission=post.id, top_comment_id=comment.id).count() + 1
offset += 1
if count > 50: break
else:
for comment in comments:
comments2.append(comment)
count += g.db.query(Comment.id).filter_by(parent_submission=post.id, parent_comment_id=comment.id).count() + 1
offset += 1
if count > 10: break
offset = 0
if len(comments) == len(comments2): offset = None
comments = comments2
if len(comments) > 60:
comments2 = []
count = 0
if post.created_utc > 1638672040:
for comment in comments:
comments2.append(comment)
count += g.db.query(Comment.id).filter_by(parent_submission=post.id, top_comment_id=comment.id).count() + 1
offset += 1
if count > 50: break
else:
for comment in comments:
comments2.append(comment)
count += g.db.query(Comment.id).filter_by(parent_submission=post.id, parent_comment_id=comment.id).count() + 1
offset += 1
if count > 10: break
if len(comments) == len(comments2): offset = None
comments = comments2
post.replies = pinned + comments
@ -231,6 +229,7 @@ def post_id(pid, anything=None, v=None):
@limiter.limit("1/second")
@auth_desired
def viewmore(v, pid, sort, offset):
offset = int(offset)
if v:
votes = g.db.query(CommentVote).filter_by(user_id=v.id).subquery()
@ -285,7 +284,7 @@ def viewmore(v, pid, sort, offset):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
if offset: comments = comments.offset(int(offset))
comments = comments.offset(offset)
comments = [c[0] for c in comments.all()]
else:
@ -302,11 +301,32 @@ def viewmore(v, pid, sort, offset):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
if offset: comments = comments.offset(int(offset))
comments = comments.offset(offset)
comments = comments.all()
return render_template("comments.html", v=v, comments=comments, render_replies=True)
if len(comments) > 60:
comments2 = []
count = 0
post = get_post(pid, v=v)
if post.created_utc > 1638672040:
for comment in comments:
comments2.append(comment)
count += g.db.query(Comment.id).filter_by(parent_submission=post.id, top_comment_id=comment.id).count() + 1
offset += 1
if count > 50: break
else:
for comment in comments:
comments2.append(comment)
count += g.db.query(Comment.id).filter_by(parent_submission=post.id, parent_comment_id=comment.id).count() + 1
offset += 1
if count > 10: break
if len(comments) == len(comments2): offset = None
comments = comments2
else: offset = None
return render_template("comments.html", v=v, comments=comments, render_replies=True, pid=pid, sort=sort, offset=offset)
@app.post("/edit_post/<pid>")
@ -483,7 +503,7 @@ def edit_post(pid, v):
user = g.db.query(User).filter_by(username=username).first()
if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id)
message = f"@{v.username} has mentioned you: http://{site}{p.permalink}"
message = f"@{v.username} has mentioned you: https://{site}{p.permalink}"
for x in notify_users: send_notification(x, message)
@ -526,8 +546,8 @@ def thumbnail_thread(pid):
if fragment_url.startswith("https://"):
return fragment_url
elif fragment_url.startswith("http://"):
return f"https://{fragment_url.split('http://')[1]}"
elif fragment_url.startswith("https://"):
return f"https://{fragment_url.split('https://')[1]}"
elif fragment_url.startswith('//'):
return f"https:{fragment_url}"
elif fragment_url.startswith('/'):
@ -970,12 +990,12 @@ def submit_post(v):
user = g.db.query(User).filter_by(username=username).first()
if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id)
for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{new_post.permalink}")
for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: https://{site}{new_post.permalink}")
for follow in v.followers:
user = get_account(follow.user_id)
if new_post.club and not user.club_allowed: continue
send_notification(user.id, f"@{v.username} has made a new post: [{title}](http://{site}{new_post.permalink})", True)
send_notification(user.id, f"@{v.username} has made a new post: [{title}](https://{site}{new_post.permalink})", True)
g.db.add(new_post)
g.db.flush()
@ -1121,7 +1141,7 @@ def submit_post(v):
cache.delete_memoized(frontlist)
cache.delete_memoized(User.userpagelisting)
if v.admin_level > 1 and ("[changelog]" in new_post.title or "(changelog)" in new_post.title):
send_message(f"http://{site}{new_post.permalink}")
send_message(f"https://{site}{new_post.permalink}")
cache.delete_memoized(changeloglist)
g.db.commit()

View File

@ -4,48 +4,47 @@ from flask import g
from files.__main__ import app, limiter
from os import path
@app.post("/flag/post/<pid>")
@app.post("/report/post/<pid>")
@limiter.limit("1/second")
@auth_desired
@auth_required
def api_flag_post(pid, v):
post = get_post(pid)
if v and not v.shadowbanned:
existing = g.db.query(Flag.id).filter_by(user_id=v.id, post_id=post.id).first()
if existing: return "", 409
if not v.shadowbanned:
reason = request.values.get("reason", "").strip()[:100]
if "<" in reason: return {"error": f"Reasons can't contain <"}
if not reason.startswith('!'):
existing = g.db.query(Flag.id).filter_by(user_id=v.id, post_id=post.id).first()
if existing: return "", 409
for i in re.finditer(':(.{1,30}?):', reason):
if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'):
reason = reason.replace(f':{i.group(1)}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{i.group(1)}:" title=":{i.group(1)}:" delay="0" height=20 src="http://{site}/assets/images/emojis/{i.group(1)}.webp">')
reason = reason.replace(f':{i.group(1)}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{i.group(1)}:" title=":{i.group(1)}:" delay="0" height=20 src="https://{site}/assets/images/emojis/{i.group(1)}.webp">')
if len(reason) > 350: return {"error": f"Too long."}
flag = Flag(post_id=post.id,
user_id=v.id,
reason=reason,
)
g.db.add(flag)
if reason.startswith('!') and v.admin_level > 1:
post.flair = reason[1:]
g.db.add(post)
else:
flag = Flag(post_id=post.id, user_id=v.id, reason=reason)
g.db.add(flag)
g.db.commit()
return {"message": "Post reported!"}
@app.post("/flag/comment/<cid>")
@app.post("/report/comment/<cid>")
@limiter.limit("1/second")
@auth_desired
@auth_required
def api_flag_comment(cid, v):
comment = get_comment(cid)
if v and not v.shadowbanned:
if not v.shadowbanned:
existing = g.db.query(CommentFlag.id).filter_by(
user_id=v.id, comment_id=comment.id).first()
@ -55,7 +54,7 @@ def api_flag_comment(cid, v):
for i in re.finditer(':(.{1,30}?):', reason):
if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'):
reason = reason.replace(f':{i.group(1)}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{i.group(1)}:" title=":{i.group(1)}:" delay="0" height=20 src="http://{site}/assets/images/emojis/{i.group(1)}.webp">')
reason = reason.replace(f':{i.group(1)}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{i.group(1)}:" title=":{i.group(1)}:" delay="0" height=20 src="https://{site}/assets/images/emojis/{i.group(1)}.webp">')
if len(reason) > 350: return {"error": f"Too long."}

View File

@ -231,7 +231,7 @@ def contact(v):
@limiter.limit("1/second")
@auth_required
def submit_contact(v):
message = f'This message has been sent automatically to all admins via http://{site}/contact, user email is "{v.email}"\n\nMessage:\n\n' + request.values.get("message", "")
message = f'This message has been sent automatically to all admins via https://{site}/contact, user email is "{v.email}"\n\nMessage:\n\n' + request.values.get("message", "")
send_admin(v.id, message)
g.db.commit()
return render_template("contact.html", v=v, msg="Your message has been sent.")

View File

@ -383,7 +383,7 @@ def message2(v, username):
'notification': {
'title': f'New message from @{v.username}',
'body': message,
'deep_link': f'http://{site}/notifications',
'deep_link': f'https://{site}/notifications',
},
},
},

View File

@ -10,16 +10,16 @@
<title>{% block pagetitle %}{{'SITE_NAME' | app_config}}{% endblock %}</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<link href="/assets/css/opensans.css?v=1" rel="stylesheet">
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=135"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=124">
<link rel="stylesheet" href="/assets/css/main.css?v=136"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=124">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=124">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=135"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
<link rel="stylesheet" href="/assets/css/main.css?v=136"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
{% endif %}
</head>

View File

@ -81,9 +81,6 @@
</div>
</div>
{% endblock %}
{% block pagenav %}
{% if listing %}
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm mb-0">

View File

@ -8,7 +8,7 @@
<title></title>
<style type="text/css" rel="stylesheet" media="all">
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap');
@import url('https://rdrama.net/assets/css/roboto.css');
html {
font-size: 14px;

View File

@ -84,7 +84,7 @@
</div>
</div>
<script src="/assets/js/emoji_modal.js?v=137"></script>
<script src="/assets/js/emoji_modal.js?v=139"></script>
<style>
a.emojitab {

View File

@ -6,11 +6,11 @@
{% block content %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=135"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=124">
<link rel="stylesheet" href="/assets/css/main.css?v=136"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=124">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=124">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=135"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
<link rel="stylesheet" href="/assets/css/main.css?v=136"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
{% endif %}
<div class="row justify-content-around">
@ -122,7 +122,7 @@
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script src="/assets/js/clipboard.js?v=1"></script>
<script>
var clipboard = new ClipboardJS('.copy-link');

View File

@ -12,7 +12,7 @@
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=135"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
<link rel="stylesheet" href="/assets/css/main.css?v=136"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
</head>

View File

@ -3,7 +3,7 @@
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<script src="/assets/js/bootstrap.js?v=1"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@ -33,18 +33,18 @@
<title>{% block pagetitle %}{{'SITE_NAME' | app_config}}{% endblock %}</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<link href="/assets/css/opensans.css?v=1" rel="stylesheet">
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=135"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=124">
<link rel="stylesheet" href="/assets/css/main.css?v=136"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=124">
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=135"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
<link rel="stylesheet" href="/assets/css/main.css?v=136"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
{% endif %}
<link href="/assets/css/fa.css?v=52" rel="stylesheet">
<link href="/assets/css/fa.css?v=53" rel="stylesheet">
</head>
<body id="settings2" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">

View File

@ -3,7 +3,7 @@
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<script src="/assets/js/bootstrap.js?v=1"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@ -28,10 +28,10 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %}</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<link href="/assets/css/opensans.css?v=1" rel="stylesheet">
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=135"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
<link rel="stylesheet" href="/assets/css/main.css?v=136"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=124">
</head>

View File

@ -694,7 +694,7 @@ replica-lazy-flush no
# If the AOF is enabled on startup Redis will load the AOF, that is the file
# with the better durability guarantees.
#
# Please check http://redis.io/topics/persistence for more information.
# Please check https://redis.io/topics/persistence for more information.
appendonly no
@ -721,7 +721,7 @@ appendfilename "appendonly.aof"
# everysec.
#
# More details please check the following article:
# http://antirez.com/post/redis-persistence-demystified.html
# https://antirez.com/post/redis-persistence-demystified.html
#
# If unsure, use "everysec".
@ -933,7 +933,7 @@ lua-time-limit 5000
# cluster-replica-no-failover no
# In order to setup your cluster make sure to read the documentation
# available at http://redis.io web site.
# available at https://redis.io web site.
########################## CLUSTER DOCKER/NAT support ########################
@ -1016,7 +1016,7 @@ latency-monitor-threshold 0
############################# EVENT NOTIFICATION ##############################
# Redis can notify Pub/Sub clients about events happening in the key space.
# This feature is documented at http://redis.io/topics/notifications
# This feature is documented at https://redis.io/topics/notifications
#
# For instance if keyspace events notification is enabled, and a client
# performs a DEL operation on key "foo" stored in the Database 0, two

View File

@ -585,7 +585,8 @@ CREATE TABLE public.submissions (
embed_url character varying(1500),
ban_reason character varying(25),
title_html character varying(1500),
realupvotes integer
realupvotes integer,
flair character varying(350)
);
@ -1711,7 +1712,6 @@ ALTER TABLE ONLY public.flags
ALTER TABLE ONLY public.notifications
ADD CONSTRAINT notifications_comment_id_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id);
--
-- PostgreSQL database dump complete
--