Merge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
884168660d
|
@ -26,7 +26,6 @@ class Comment(Base):
|
||||||
created_utc = Column(Integer, default=0)
|
created_utc = Column(Integer, default=0)
|
||||||
edited_utc = Column(Integer, default=0)
|
edited_utc = Column(Integer, default=0)
|
||||||
is_banned = Column(Boolean, default=False)
|
is_banned = Column(Boolean, default=False)
|
||||||
removed_by = Column(Integer)
|
|
||||||
bannedfor = Column(Boolean)
|
bannedfor = Column(Boolean)
|
||||||
distinguish_level = Column(Integer, default=0)
|
distinguish_level = Column(Integer, default=0)
|
||||||
deleted_utc = Column(Integer, default=0)
|
deleted_utc = Column(Integer, default=0)
|
||||||
|
|
|
@ -27,7 +27,6 @@ class Submission(Base):
|
||||||
created_utc = Column(BigInteger, default=0)
|
created_utc = Column(BigInteger, default=0)
|
||||||
thumburl = Column(String)
|
thumburl = Column(String)
|
||||||
is_banned = Column(Boolean, default=False)
|
is_banned = Column(Boolean, default=False)
|
||||||
removed_by = Column(Integer)
|
|
||||||
bannedfor = Column(Boolean)
|
bannedfor = Column(Boolean)
|
||||||
views = Column(Integer, default=0)
|
views = Column(Integer, default=0)
|
||||||
deleted_utc = Column(Integer, default=0)
|
deleted_utc = Column(Integer, default=0)
|
||||||
|
|
|
@ -22,14 +22,6 @@ def post_embed(id, v):
|
||||||
|
|
||||||
return render_template("submission_listing.html", listing=[p], v=v)
|
return render_template("submission_listing.html", listing=[p], v=v)
|
||||||
|
|
||||||
@app.template_filter("favorite_emojis")
|
|
||||||
def favorite_emojis(x):
|
|
||||||
str = ""
|
|
||||||
emojis = sorted(x.items(), key=lambda x: x[1], reverse=True)[:25]
|
|
||||||
for k, v in emojis:
|
|
||||||
str += f'<button class="m-1 p-[3px] bg-transparent hover:bg-gray-300 w-16 h-16 overflow-hidden" onclick="getEmoji(\'{k}\')" data-bs-toggle="tooltip" title=":{k}:" delay:="0"><img loading="lazy" width=50 src="/assets/images/emojis/{k}.webp" alt="{k}-emoji"></button>'
|
|
||||||
return str
|
|
||||||
|
|
||||||
@app.context_processor
|
@app.context_processor
|
||||||
def inject_constants():
|
def inject_constants():
|
||||||
constants = [c for c in dir(const) if not c.startswith("_")]
|
constants = [c for c in dir(const) if not c.startswith("_")]
|
||||||
|
|
|
@ -74,11 +74,6 @@ class CustomRenderer(HTMLRenderer):
|
||||||
user = get_user(target, graceful=True)
|
user = get_user(target, graceful=True)
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
if g.v.admin_level == 0 and g.v.any_block_exists(user):
|
|
||||||
return f"{space}@{target}"
|
|
||||||
except BaseException: pass
|
|
||||||
|
|
||||||
if not user: return f"{space}@{target}"
|
if not user: return f"{space}@{target}"
|
||||||
|
|
||||||
return f'''{space}<a href="{user.url}"><img alt="@{user.username}'s profile picture" loading="lazy" src="/uid/{user.id}/pic" class="pp20">@{user.username}</a>'''
|
return f'''{space}<a href="{user.url}"><img alt="@{user.username}'s profile picture" loading="lazy" src="/uid/{user.id}/pic" class="pp20">@{user.username}</a>'''
|
||||||
|
@ -113,13 +108,6 @@ class Renderer(HTMLRenderer):
|
||||||
|
|
||||||
user = get_user(target, graceful=True)
|
user = get_user(target, graceful=True)
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
if g.v.admin_level == 0 and g.v.any_block_exists(user):
|
|
||||||
return f"{space}@{target}"
|
|
||||||
except BaseException:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if not user: return f"{space}@{target}"
|
if not user: return f"{space}@{target}"
|
||||||
|
|
||||||
return f'{space}<a href="{user.url}">@{user.username}</a>'
|
return f'{space}<a href="{user.url}">@{user.username}</a>'
|
||||||
|
|
|
@ -183,7 +183,7 @@ def sanitize(sanitized, noimages=False):
|
||||||
remoji = emoji
|
remoji = emoji
|
||||||
|
|
||||||
if path.isfile(f'files/assets/images/emojis/{remoji}.webp'):
|
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}: emoji" title=":{emoji}:" delay="0" {classes}src="/assets/images/emojis/{remoji}.webp" >', new, flags=re.I)
|
new = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" {classes}src="/assets/images/emojis/{remoji}.webp" >', new, flags=re.I)
|
||||||
|
|
||||||
sanitized = sanitized.replace(old, new)
|
sanitized = sanitized.replace(old, new)
|
||||||
|
|
||||||
|
@ -193,10 +193,10 @@ def sanitize(sanitized, noimages=False):
|
||||||
if emoji.startswith("!"):
|
if emoji.startswith("!"):
|
||||||
emoji = emoji[1:]
|
emoji = emoji[1:]
|
||||||
if path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
|
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}: emoji" title=":!{emoji}:" delay="0" height=30 class="emoji mirrored" src="/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
sanitized = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=30 class="emoji mirrored" src="/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
||||||
|
|
||||||
elif path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
|
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}: emoji" title=":{emoji}:" delay="0" height=30 class="emoji" src="/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
sanitized = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=30 class="emoji" src="/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
||||||
|
|
||||||
sanitized = sanitized.replace("https://www.", "https://").replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=").replace("https://mobile.twitter", "https://twitter").replace("https://m.facebook", "https://facebook").replace("https://m.wikipedia", "https://wikipedia").replace("https://m.youtube", "https://youtube")
|
sanitized = sanitized.replace("https://www.", "https://").replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=").replace("https://mobile.twitter", "https://twitter").replace("https://m.facebook", "https://facebook").replace("https://m.wikipedia", "https://wikipedia").replace("https://m.youtube", "https://youtube")
|
||||||
|
|
||||||
|
@ -240,10 +240,10 @@ def filter_emojis_only(title):
|
||||||
if emoji.startswith("!"):
|
if emoji.startswith("!"):
|
||||||
emoji = emoji[1:]
|
emoji = emoji[1:]
|
||||||
if path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
|
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}: emoji" title=":!{emoji}:" delay="0" height=30 src="/assets/images/emojis/{emoji}.webp" class="emoji mirrored">', title, flags=re.I)
|
title = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=30 src="/assets/images/emojis/{emoji}.webp" class="emoji mirrored">', title, flags=re.I)
|
||||||
|
|
||||||
elif path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
|
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}: emoji" title=":{emoji}:" delay="0" height=30 class="emoji" src="/assets/images/emojis/{emoji}.webp">', title, flags=re.I)
|
title = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=30 class="emoji" src="/assets/images/emojis/{emoji}.webp">', title, flags=re.I)
|
||||||
|
|
||||||
if len(title) > 1500: abort(400)
|
if len(title) > 1500: abort(400)
|
||||||
else: return title
|
else: return title
|
|
@ -4,36 +4,27 @@ from files.helpers.const import *
|
||||||
|
|
||||||
|
|
||||||
def get_logged_in_user():
|
def get_logged_in_user():
|
||||||
|
token = request.headers.get("Authorization")
|
||||||
|
|
||||||
if request.headers.get("Authorization"):
|
if token:
|
||||||
token = request.headers.get("Authorization")
|
client = g.db.query(ClientAuth).filter(ClientAuth.access_token == token).first()
|
||||||
if not token: return None
|
if not client: return None
|
||||||
|
|
||||||
try:
|
|
||||||
client = g.db.query(ClientAuth).filter(ClientAuth.access_token == token).first()
|
|
||||||
x = (client.user, client) if client else (None, None)
|
|
||||||
except: x = (None, None)
|
|
||||||
|
|
||||||
|
|
||||||
|
v = client.user
|
||||||
|
v.client = client
|
||||||
|
return v
|
||||||
else:
|
else:
|
||||||
|
|
||||||
uid = session.get("user_id")
|
uid = session.get("user_id")
|
||||||
nonce = session.get("login_nonce", 0)
|
nonce = session.get("login_nonce", 0)
|
||||||
if not uid: x= (None, None)
|
logged_in = session.get("logged_in")
|
||||||
try:
|
|
||||||
if g.db: v = g.db.query(User).filter_by(id=uid).first()
|
|
||||||
else: v = None
|
|
||||||
except: v = None
|
|
||||||
|
|
||||||
if v and (nonce < v.login_nonce):
|
if not uid: return None
|
||||||
x= (None, None)
|
# if not uid or not logged_in or uid != logged_in: return None
|
||||||
else:
|
|
||||||
x=(v, None)
|
|
||||||
|
|
||||||
|
v = g.db.query(User).filter_by(id=uid).first()
|
||||||
|
if not v or nonce < v.login_nonce: return None
|
||||||
|
|
||||||
if x[0]: x[0].client=x[1]
|
return v
|
||||||
|
|
||||||
return x[0]
|
|
||||||
|
|
||||||
def check_ban_evade(v):
|
def check_ban_evade(v):
|
||||||
if v and v.ban_evade and v.admin_level == 0 and not v.is_suspended:
|
if v and v.ban_evade and v.admin_level == 0 and not v.is_suspended:
|
||||||
|
@ -47,8 +38,6 @@ def auth_desired(f):
|
||||||
|
|
||||||
v = get_logged_in_user()
|
v = get_logged_in_user()
|
||||||
|
|
||||||
if request.host == 'old.rdrama.net' and not (v and v.admin_level) and '/log' not in request.path:
|
|
||||||
return redirect(request.url.replace('https://old.','https://'))
|
|
||||||
check_ban_evade(v)
|
check_ban_evade(v)
|
||||||
|
|
||||||
resp = make_response(f(*args, v=v, **kwargs))
|
resp = make_response(f(*args, v=v, **kwargs))
|
||||||
|
@ -65,14 +54,9 @@ def auth_required(f):
|
||||||
v = get_logged_in_user()
|
v = get_logged_in_user()
|
||||||
|
|
||||||
if not v: abort(401)
|
if not v: abort(401)
|
||||||
|
|
||||||
if request.host == 'old.rdrama.net' and not v.admin_level:
|
|
||||||
return redirect(request.url.replace('https://old.','https://'))
|
|
||||||
|
|
||||||
check_ban_evade(v)
|
check_ban_evade(v)
|
||||||
|
|
||||||
g.v = v
|
|
||||||
|
|
||||||
resp = make_response(f(*args, v=v, **kwargs))
|
resp = make_response(f(*args, v=v, **kwargs))
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
@ -88,14 +72,10 @@ def is_not_banned(f):
|
||||||
|
|
||||||
if not v: abort(401)
|
if not v: abort(401)
|
||||||
|
|
||||||
if request.host == 'old.rdrama.net' and not v.admin_level:
|
|
||||||
return redirect(request.url.replace('https://old.','https://'))
|
|
||||||
check_ban_evade(v)
|
check_ban_evade(v)
|
||||||
|
|
||||||
if v.is_suspended: return {"error": "You can't perform this action while being banned."}, 403
|
if v.is_suspended: return {"error": "You can't perform this action while being banned."}, 403
|
||||||
|
|
||||||
g.v = v
|
|
||||||
|
|
||||||
resp = make_response(f(*args, v=v, **kwargs))
|
resp = make_response(f(*args, v=v, **kwargs))
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
@ -115,8 +95,6 @@ def admin_level_required(x):
|
||||||
|
|
||||||
if v.admin_level < x: abort(403)
|
if v.admin_level < x: abort(403)
|
||||||
|
|
||||||
g.v = v
|
|
||||||
|
|
||||||
response = f(*args, v=v, **kwargs)
|
response = f(*args, v=v, **kwargs)
|
||||||
|
|
||||||
if isinstance(response, tuple): resp = make_response(response[0])
|
if isinstance(response, tuple): resp = make_response(response[0])
|
||||||
|
|
|
@ -49,28 +49,41 @@ def truescore(v):
|
||||||
|
|
||||||
@app.post("/@<username>/revert_actions")
|
@app.post("/@<username>/revert_actions")
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("1/second")
|
||||||
@admin_level_required(2)
|
@admin_level_required(3)
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def revert_actions(v, username):
|
def revert_actions(v, username):
|
||||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.admin_level > 2) or ('rama' not in request.host and 'pcm' not in request.host):
|
user = get_user(username)
|
||||||
user = get_user(username)
|
if not user: abort(404)
|
||||||
if not user: abort(404)
|
|
||||||
|
cutoff = int(time.time()) - 86400
|
||||||
|
|
||||||
items = g.db.query(Submission).filter_by(removed_by=user.id).all() + g.db.query(Comment).filter_by(removed_by=user.id).all()
|
posts = [x[0] for x in g.db.query(ModAction.target_submission_id).filter(ModAction.user_id == user.id, ModAction.created_utc > cutoff, ModAction.kind == 'ban_post').all()]
|
||||||
|
posts = g.db.query(Submission).filter(Submission.id.in_(posts)).all()
|
||||||
|
|
||||||
for item in items:
|
comments = [x[0] for x in g.db.query(ModAction.target_comment_id).filter(ModAction.user_id == user.id, ModAction.created_utc > cutoff, ModAction.kind == 'ban_comment').all()]
|
||||||
item.is_banned = False
|
comments = g.db.query(Comment).filter(Comment.id.in_(comments)).all()
|
||||||
item.removed_by = None
|
|
||||||
g.db.add(item)
|
for item in posts + comments:
|
||||||
|
item.is_banned = False
|
||||||
|
g.db.add(item)
|
||||||
|
|
||||||
users = g.db.query(User).filter_by(is_banned=user.id).all()
|
users = (x[0] for x in g.db.query(ModAction.target_user_id).filter(ModAction.user_id == user.id, ModAction.created_utc > cutoff, ModAction.kind.in_(('shadowban', 'ban_user'))).all())
|
||||||
for user in users:
|
users = g.db.query(User).filter(User.id.in_(users)).all()
|
||||||
user.is_banned = 0
|
|
||||||
user.unban_utc = 0
|
|
||||||
user.ban_evade = 0
|
|
||||||
g.db.add(user)
|
|
||||||
|
|
||||||
g.db.commit()
|
for user in users:
|
||||||
|
user.shadowbanned = None
|
||||||
|
user.is_banned = 0
|
||||||
|
user.unban_utc = 0
|
||||||
|
user.ban_evade = 0
|
||||||
|
g.db.add(user)
|
||||||
|
for u in user.alts:
|
||||||
|
u.shadowbanned = None
|
||||||
|
u.is_banned = 0
|
||||||
|
u.unban_utc = 0
|
||||||
|
u.ban_evade = 0
|
||||||
|
g.db.add(u)
|
||||||
|
|
||||||
|
g.db.commit()
|
||||||
return {"message": "Admin actions reverted!"}
|
return {"message": "Admin actions reverted!"}
|
||||||
|
|
||||||
@app.post("/@<username>/club_allow")
|
@app.post("/@<username>/club_allow")
|
||||||
|
@ -868,7 +881,6 @@ def ban_post(post_id, v):
|
||||||
post.is_approved = 0
|
post.is_approved = 0
|
||||||
post.stickied = None
|
post.stickied = None
|
||||||
post.is_pinned = False
|
post.is_pinned = False
|
||||||
post.removed_by = v.id
|
|
||||||
post.ban_reason = v.username
|
post.ban_reason = v.username
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
|
|
||||||
|
@ -955,6 +967,9 @@ def api_distinguish_post(post_id, v):
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def api_sticky_post(post_id, v):
|
def api_sticky_post(post_id, v):
|
||||||
|
|
||||||
|
pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count()
|
||||||
|
if pins > 2: return {"error": "Can't exceed 3 pinned posts limit!"}, 403
|
||||||
|
|
||||||
post = g.db.query(Submission).filter_by(id=post_id).first()
|
post = g.db.query(Submission).filter_by(id=post_id).first()
|
||||||
if post:
|
if post:
|
||||||
if post.stickied:
|
if post.stickied:
|
||||||
|
@ -997,7 +1012,6 @@ def api_ban_comment(c_id, v):
|
||||||
|
|
||||||
comment.is_banned = True
|
comment.is_banned = True
|
||||||
comment.is_approved = 0
|
comment.is_approved = 0
|
||||||
comment.removed_by = v.id
|
|
||||||
comment.ban_reason = v.username
|
comment.ban_reason = v.username
|
||||||
g.db.add(comment)
|
g.db.add(comment)
|
||||||
ma=ModAction(
|
ma=ModAction(
|
||||||
|
|
|
@ -68,7 +68,6 @@ def error_500(e, v):
|
||||||
|
|
||||||
@app.post("/allow_nsfw")
|
@app.post("/allow_nsfw")
|
||||||
def allow_nsfw():
|
def allow_nsfw():
|
||||||
|
|
||||||
session["over_18"] = int(time.time()) + 3600
|
session["over_18"] = int(time.time()) + 3600
|
||||||
return redirect(request.values.get("redir", "/"))
|
return redirect(request.values.get("redir", "/"))
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,9 @@ def notifications(v):
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def front_all(v):
|
def front_all(v):
|
||||||
|
|
||||||
|
if request.host == 'old.rdrama.net' and not (v and v.admin_level):
|
||||||
|
return render_template("home.html", v=v, listing=[], next_exists=False, sort='hot', t='all', page=1)
|
||||||
|
|
||||||
if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}")
|
if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}")
|
||||||
|
|
||||||
if v and v.is_banned and not v.unban_utc: return render_template('errors/500.html', error=True, v=v), 500
|
if v and v.is_banned and not v.unban_utc: return render_template('errors/500.html', error=True, v=v), 500
|
||||||
|
@ -199,10 +202,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
||||||
|
|
||||||
posts = g.db.query(Submission)
|
posts = g.db.query(Submission)
|
||||||
|
|
||||||
if SITE_NAME == 'Drama' and sort == "hot":
|
if t == 'all': cutoff = 0
|
||||||
cutoff = int(time.time()) - 86400
|
else:
|
||||||
posts = posts.filter(Submission.created_utc >= cutoff)
|
|
||||||
elif t != 'all':
|
|
||||||
now = int(time.time())
|
now = int(time.time())
|
||||||
if t == 'hour': cutoff = now - 3600
|
if t == 'hour': cutoff = now - 3600
|
||||||
elif t == 'week': cutoff = now - 604800
|
elif t == 'week': cutoff = now - 604800
|
||||||
|
@ -210,7 +211,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
||||||
elif t == 'year': cutoff = now - 31536000
|
elif t == 'year': cutoff = now - 31536000
|
||||||
else: cutoff = now - 86400
|
else: cutoff = now - 86400
|
||||||
posts = posts.filter(Submission.created_utc >= cutoff)
|
posts = posts.filter(Submission.created_utc >= cutoff)
|
||||||
else: cutoff = 0
|
|
||||||
|
|
||||||
if sort != "hot": posts = posts.filter_by(is_banned=False, private=False, deleted_utc = 0)
|
if sort != "hot": posts = posts.filter_by(is_banned=False, private=False, deleted_utc = 0)
|
||||||
else: posts = posts.filter_by(is_banned=False, stickied=None, private=False, deleted_utc = 0)
|
else: posts = posts.filter_by(is_banned=False, stickied=None, private=False, deleted_utc = 0)
|
||||||
|
|
|
@ -132,6 +132,7 @@ def login_post():
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
session["user_id"] = account.id
|
session["user_id"] = account.id
|
||||||
|
session["logged_in"] = account.id
|
||||||
session["session_id"] = token_hex(16)
|
session["session_id"] = token_hex(16)
|
||||||
session["login_nonce"] = account.login_nonce
|
session["login_nonce"] = account.login_nonce
|
||||||
session.permanent = True
|
session.permanent = True
|
||||||
|
@ -162,6 +163,7 @@ def logout(v):
|
||||||
|
|
||||||
session.pop("user_id", None)
|
session.pop("user_id", None)
|
||||||
session.pop("session_id", None)
|
session.pop("session_id", None)
|
||||||
|
session.pop("logged_in", None)
|
||||||
|
|
||||||
return {"message": "Logout successful!"}
|
return {"message": "Logout successful!"}
|
||||||
|
|
||||||
|
@ -350,6 +352,7 @@ def sign_up_post(v):
|
||||||
if "rama" in request.host: send_notification(new_user.id, WELCOME_MSG)
|
if "rama" in request.host: send_notification(new_user.id, WELCOME_MSG)
|
||||||
|
|
||||||
session["user_id"] = new_user.id
|
session["user_id"] = new_user.id
|
||||||
|
session["logged_in"] = new_user.id
|
||||||
session["session_id"] = token_hex(16)
|
session["session_id"] = token_hex(16)
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
|
@ -211,8 +211,7 @@ def post_id(pid, anything=None, v=None):
|
||||||
|
|
||||||
post.views += 1
|
post.views += 1
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
if isinstance(session.get('over_18', 0), dict): session["over_18"] = 0
|
if post.over_18 and not (v and v.over_18) and session.get('over_18', 0) < int(time.time()):
|
||||||
if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()):
|
|
||||||
if request.headers.get("Authorization"): return {"error":"Must be 18+ to view"}, 451
|
if request.headers.get("Authorization"): return {"error":"Must be 18+ to view"}, 451
|
||||||
else: return render_template("errors/nsfw.html", v=v)
|
else: return render_template("errors/nsfw.html", v=v)
|
||||||
|
|
||||||
|
@ -1047,12 +1046,12 @@ def submit_post(v):
|
||||||
user = g.db.query(User).filter_by(username=username).first()
|
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)
|
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: [{title}]({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:
|
for follow in v.followers:
|
||||||
user = get_account(follow.user_id)
|
user = get_account(follow.user_id)
|
||||||
if new_post.club and not user.club_allowed: continue
|
if new_post.club and not user.club_allowed: continue
|
||||||
send_notification(user.id, f"@{v.username} has made a new post: [{title}]({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.add(new_post)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
@ -1146,8 +1145,10 @@ def submit_post(v):
|
||||||
rev = new_post.url.replace('https://old.reddit.com/', '')
|
rev = new_post.url.replace('https://old.reddit.com/', '')
|
||||||
rev = f"* [unddit.com](https://unddit.com/{rev})\n"
|
rev = f"* [unddit.com](https://unddit.com/{rev})\n"
|
||||||
else: rev = ''
|
else: rev = ''
|
||||||
body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{new_post.url})\n* [archive.ph](https://archive.ph/?url={quote(new_post.url)}&run=1) (click to archive)\n\n"
|
newposturl = new_post.url
|
||||||
gevent.spawn(archiveorg, new_post.url)
|
if newposturl.startswith('/'): newposturl = f"https://{site}{newposturl}"
|
||||||
|
body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{newposturl})\n* [archive.ph](https://archive.ph/?url={quote(newposturl)}&run=1) (click to archive)\n\n"
|
||||||
|
gevent.spawn(archiveorg, newposturl)
|
||||||
|
|
||||||
url_regex = '<a (target=\"_blank\" )?(rel=\"nofollow noopener noreferrer\" )?href=\"(https?://[a-z]{1,20}\.[^\"]+)\"( rel=\"nofollow noopener noreferrer\" target=\"_blank\")?>([^\"]+)</a>'
|
url_regex = '<a (target=\"_blank\" )?(rel=\"nofollow noopener noreferrer\" )?href=\"(https?://[a-z]{1,20}\.[^\"]+)\"( rel=\"nofollow noopener noreferrer\" target=\"_blank\")?>([^\"]+)</a>'
|
||||||
for url_match in re.finditer(url_regex, new_post.body_html, flags=re.M|re.I):
|
for url_match in re.finditer(url_regex, new_post.body_html, flags=re.M|re.I):
|
||||||
|
|
|
@ -698,7 +698,8 @@ def settings_log_out_others(v):
|
||||||
|
|
||||||
submitted_password = request.values.get("password", "").strip()
|
submitted_password = request.values.get("password", "").strip()
|
||||||
|
|
||||||
if not v.verifyPass(submitted_password): return render_template("settings_security.html", v=v, error="Incorrect Password"), 401
|
if not v.verifyPass(submitted_password):
|
||||||
|
return render_template("settings_security.html", v=v, error="Incorrect Password"), 401
|
||||||
|
|
||||||
v.login_nonce += 1
|
v.login_nonce += 1
|
||||||
|
|
||||||
|
|
|
@ -289,6 +289,7 @@ def static_service(path):
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
@app.get('/images/<path:path>')
|
@app.get('/images/<path:path>')
|
||||||
|
@app.get('/IMAGES/<path:path>')
|
||||||
@app.get('/hostedimages/<path:path>')
|
@app.get('/hostedimages/<path:path>')
|
||||||
@limiter.exempt
|
@limiter.exempt
|
||||||
def images(path):
|
def images(path):
|
||||||
|
|
|
@ -2382,7 +2382,7 @@ img.emoji-md {
|
||||||
object-fit: contain}
|
object-fit: contain}
|
||||||
|
|
||||||
img.emoji-lg {
|
img.emoji-lg {
|
||||||
max-width: 100%;
|
max-width: 10rem;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
-o-object-fit: contain;
|
-o-object-fit: contain;
|
||||||
object-fit: contain}
|
object-fit: contain}
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=400"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{v.theme}}.css?v=200">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=410"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{v.theme}}.css?v=200">
|
||||||
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/CHRISTMAS/css/agendaposter.css?v=200">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/CHRISTMAS/css/agendaposter.css?v=200">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=400"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=410"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -186,9 +186,9 @@
|
||||||
|
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=400">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=410">
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/dist/main.css?v=405">
|
<link rel="stylesheet" href="/static/dist/main.css?v=410">
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/mistletoe.css?v=400">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/mistletoe.css?v=400">
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,6 @@
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane fade show active" id="emoji-tab-favorite">
|
<div class="tab-pane fade show active" id="emoji-tab-favorite">
|
||||||
<div class="flex flex-wrap p-3" id="EMOJIS_favorite">
|
<div class="flex flex-wrap p-3" id="EMOJIS_favorite">
|
||||||
{% if session.get("favorite_emojis") %}
|
|
||||||
{{session.get("favorite_emojis") | favorite_emojis | safe}}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="emoji-tab-marsey">
|
<div class="tab-pane fade" id="emoji-tab-marsey">
|
||||||
|
|
|
@ -224,6 +224,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% if v %}
|
{% if v and not error %}
|
||||||
<div id="formkey" class="d-none">{{v.formkey}}</div>
|
<div id="formkey" class="d-none">{{v.formkey}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
<script src="/assets/CHRISTMAS/js/submission_listing.js?v=200"></script>
|
<script src="/assets/CHRISTMAS/js/submission_listing.js?v=200"></script>
|
||||||
|
|
||||||
{% if not v.fp %}
|
{% if v and not v.fp %}
|
||||||
<script>
|
<script>
|
||||||
function fp(fp) {
|
function fp(fp) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
<title>Login - {{'SITE_NAME' | app_config}}</title>
|
<title>Login - {{'SITE_NAME' | app_config}}</title>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=400">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=410">
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/dist/main.css?v=400">
|
<link rel="stylesheet" href="/static/dist/main.css?v=410">
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
|
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=400"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=410"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
|
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=400">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=410">
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/dist/main.css?v=400">
|
<link rel="stylesheet" href="/static/dist/main.css?v=410">
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/mistletoe.css?v=400">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/mistletoe.css?v=400">
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="pl-3 mt-[-1px] truncate">
|
<div class="pl-3 mt-[-1px] truncate">
|
||||||
<a href="/post/29747/" class="block font-medium text-black hover:text-red-600 truncate ellipsis">
|
<a href="/post/29747/" class="block font-medium text-black hover:text-red-600 truncate ellipsis">
|
||||||
rDrama presents: FISTMAS 2021 | Santa Claus is CUMMING to town for the HOLIGAYS :marseysanta: emoji
|
rDrama presents: FISTMAS 2021 | Santa Claus is CUMMING to town for the HOLIGAYS :marseysanta:
|
||||||
</a>
|
</a>
|
||||||
<small class="block text-gray-500">
|
<small class="block text-gray-500">
|
||||||
posted by <a href="/@christmaspathianflorist" class="text-gray-500 hover:text-gray-600">@christmaspathianflorist</a>
|
posted by <a href="/@christmaspathianflorist" class="text-gray-500 hover:text-gray-600">@christmaspathianflorist</a>
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
|
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %}</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=400">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=410">
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/dist/main.css?v=400">
|
<link rel="stylesheet" href="/static/dist/main.css?v=410">
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=400"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=410"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -303,10 +303,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.is_image %}
|
{% if p.is_image %}
|
||||||
(image post)
|
<span class="flex-shrink-0">(image post)</span>
|
||||||
{% elif p.realurl(v) %}
|
{% elif p.realurl(v) %}
|
||||||
<a class="flex-shrink-0 text-gray-500 hover:underline" href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>({{p.domain}})
|
<a class="flex-shrink-0 text-gray-500 hover:underline" href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
|
||||||
</a>
|
({{p.domain}})
|
||||||
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="flex-shrink-0">(text post)</span>
|
<span class="flex-shrink-0">(text post)</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/dist/main.css?v=400">
|
<link rel="stylesheet" href="/static/dist/main.css?v=410">
|
||||||
|
|
||||||
<title>Flask + Tailwind CSS</title>
|
<title>Flask + Tailwind CSS</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
<div class="toast-body bg-success text-center text-white">
|
<div class="toast-body bg-success text-center text-white">
|
||||||
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text"></span>
|
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text">Action successful!</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
<div class="toast-body bg-success text-center text-white">
|
<div class="toast-body bg-success text-center text-white">
|
||||||
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text"></span>
|
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text">Action successful!</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
||||||
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -104,6 +104,6 @@
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/assets/js/post_toast2.js?v=190"></script>
|
<script src="/assets/js/post_toast2.js?v=197"></script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -6,12 +6,12 @@
|
||||||
<script src="/assets/js/bootstrap.js?v=190"></script>
|
<script src="/assets/js/bootstrap.js?v=190"></script>
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410">
|
||||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
||||||
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
||||||
|
@ -275,7 +275,7 @@
|
||||||
|
|
||||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
<div class="toast-body bg-success text-center text-white">
|
<div class="toast-body bg-success text-center text-white">
|
||||||
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text"></span>
|
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text">Action successful!</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
|
@ -287,7 +287,7 @@
|
||||||
<script src="/assets/js/lozad.js?v=190"></script>
|
<script src="/assets/js/lozad.js?v=190"></script>
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<script src="/assets/js/post_toast2.js?v=190"></script>
|
<script src="/assets/js/post_toast2.js?v=197"></script>
|
||||||
<script src="/assets/js/formatting.js?v=190"></script>
|
<script src="/assets/js/formatting.js?v=190"></script>
|
||||||
<script src="/assets/js/default.js?v=190"></script>
|
<script src="/assets/js/default.js?v=190"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -226,6 +226,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% if v %}
|
{% if v and not error %}
|
||||||
<div id="formkey" class="d-none">{{v.formkey}}</div>
|
<div id="formkey" class="d-none">{{v.formkey}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
|
@ -6,11 +6,11 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
||||||
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row justify-content-around">
|
<div class="row justify-content-around">
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=154">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410">
|
||||||
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
|
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
|
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
||||||
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
||||||
|
|
||||||
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
||||||
|
@ -226,7 +226,7 @@
|
||||||
|
|
||||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
<div class="toast-body bg-success text-center text-white">
|
<div class="toast-body bg-success text-center text-white">
|
||||||
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text"></span>
|
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text">Action successful!</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
|
|
||||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
<div class="toast-body bg-success text-center text-white">
|
<div class="toast-body bg-success text-center text-white">
|
||||||
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text"></span>
|
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text">Action successful!</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=190">
|
||||||
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=190">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=212">
|
<link rel="stylesheet" href="/assets/css/main.css?v=410">
|
||||||
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -260,8 +260,7 @@ CREATE TABLE public.comments (
|
||||||
app_id integer,
|
app_id integer,
|
||||||
sentto integer,
|
sentto integer,
|
||||||
bannedfor boolean,
|
bannedfor boolean,
|
||||||
removed_by integer,
|
= is_pinned character varying(30),
|
||||||
is_pinned character varying(30),
|
|
||||||
body character varying(10000),
|
body character varying(10000),
|
||||||
body_html character varying(40000),
|
body_html character varying(40000),
|
||||||
ban_reason character varying(25),
|
ban_reason character varying(25),
|
||||||
|
@ -574,7 +573,6 @@ CREATE TABLE public.submissions (
|
||||||
is_bot boolean,
|
is_bot boolean,
|
||||||
bannedfor boolean,
|
bannedfor boolean,
|
||||||
comment_count integer DEFAULT 0,
|
comment_count integer DEFAULT 0,
|
||||||
removed_by integer,
|
|
||||||
club boolean,
|
club boolean,
|
||||||
stickied character varying(25),
|
stickied character varying(25),
|
||||||
title character varying(500),
|
title character varying(500),
|
||||||
|
|
Loading…
Reference in New Issue