forked from rDrama/rDrama
Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost
commit
5d3d25e5d6
|
@ -1077,7 +1077,7 @@ forced_hats = {
|
|||
"marseyawarded": ("Three Lil Marseys", ":marseynotes: :marseynotes: :I prefer to speak in cats:"),
|
||||
"bite": ("Vampire Mask", "When other little girls wanted to be ballet dancers I kind of wanted to be a vampire."),
|
||||
"rainbow": ("Globohomo", "Homosexuality is no longer optional!"),
|
||||
"owoify": ("Furry Marsey", "Nuzzles, pounces on you, UwU, you're so warm!.."),
|
||||
"owoify": ("Cat Ears (wiggly)", "Nuzzles, pounces on you, UwU, you're so warm!.."),
|
||||
"earlylife": ("The Merchant", "SHUT IT DOWN, the goys know!"),
|
||||
"marsify": ("Marsified", "I can't pick my own Marseys, help!"),
|
||||
"is_banned": ("Behind Bars", "This user is banned and needs to do better!"),
|
||||
|
|
|
@ -112,6 +112,14 @@ def auth_desired_with_logingate(f):
|
|||
v = get_logged_in_user()
|
||||
if app.config['SETTINGS']['login_required'] and not v: abort(401)
|
||||
|
||||
if not v and not request.path.startswith('/logged_out'):
|
||||
return redirect(f"/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'):
|
||||
redir = request.full_path.replace('/logged_out','')
|
||||
if not redir: redir = '/'
|
||||
return redirect(redir)
|
||||
|
||||
check_ban_evade(v)
|
||||
|
||||
return make_response(f(*args, v=v, **kwargs))
|
||||
|
|
|
@ -34,9 +34,6 @@ WORDLE_COLOR_MAPPINGS = {-1: "🟥", 0: "🟨", 1: "🟩"}
|
|||
@auth_desired_with_logingate
|
||||
def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None):
|
||||
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}#context")
|
||||
if v and request.path.startswith('/logged_out'): return redirect(request.full_path.replace('/logged_out','') + '#context')
|
||||
|
||||
try: cid = int(cid)
|
||||
except: abort(404)
|
||||
|
||||
|
|
|
@ -19,14 +19,6 @@ from files.helpers.awards import award_timers
|
|||
@auth_desired_with_logingate
|
||||
def front_all(v, sub=None, subdomain=None):
|
||||
|
||||
if not v and not request.path.startswith('/logged_out'):
|
||||
return redirect(f"/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'):
|
||||
redir = request.full_path.replace('/logged_out','')
|
||||
if not redir.startswith('/'): redir = f'/{redir}'
|
||||
return redirect(redir)
|
||||
|
||||
if sub:
|
||||
sub = sub.strip().lower()
|
||||
if sub == 'chudrama' and not (v and v.can_see_chudrama): abort(403)
|
||||
|
|
|
@ -106,9 +106,6 @@ def submit_get(v, sub=None):
|
|||
@auth_desired_with_logingate
|
||||
def post_id(pid, anything=None, v=None, sub=None):
|
||||
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}")
|
||||
if v and request.path.startswith('/logged_out'): return redirect(request.full_path.replace('/logged_out',''))
|
||||
|
||||
try: pid = int(pid)
|
||||
except Exception as e: pass
|
||||
|
||||
|
|
|
@ -71,11 +71,8 @@ def marsey_list():
|
|||
@app.get('/sidebar')
|
||||
@app.get('/logged_out/rules')
|
||||
@app.get('/logged_out/sidebar')
|
||||
@auth_desired
|
||||
@auth_desired_with_logingate
|
||||
def sidebar(v):
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}")
|
||||
if v and request.path.startswith('/logged_out'): return redirect(request.full_path.replace('/logged_out',''))
|
||||
|
||||
return render_template('sidebar.html', v=v)
|
||||
|
||||
|
||||
|
@ -184,7 +181,7 @@ def log_item(id, v):
|
|||
return render_template("log.html", v=v, actions=[action], next_exists=False, page=1, action=action, admins=admins, types=types)
|
||||
|
||||
@app.get("/directory")
|
||||
@auth_desired
|
||||
@auth_required
|
||||
def static_megathread_index(v):
|
||||
return render_template("megathread_index.html", v=v)
|
||||
|
||||
|
@ -425,26 +422,11 @@ def transfers(v):
|
|||
else:
|
||||
return render_template("transfers.html", v=v, page=page, comments=comments, standalone=True, next_exists=next_exists)
|
||||
|
||||
@app.get("/kb/<page>")
|
||||
@auth_desired
|
||||
def knowledgebase(v, page):
|
||||
if not knowledgebase_page_regex.fullmatch(page):
|
||||
abort(404)
|
||||
|
||||
template_path = f'kb/{SITE_NAME}/{page}.html'
|
||||
if not os.path.exists('files/templates/' + template_path):
|
||||
abort(404)
|
||||
|
||||
return render_template(template_path, v=v)
|
||||
|
||||
|
||||
if not os.path.exists(f'files/templates/donate_{SITE_NAME}.html'):
|
||||
copyfile(f'files/templates/donate_rDrama.html', f'files/templates/donate_{SITE_NAME}.html')
|
||||
|
||||
@app.get('/donate')
|
||||
@auth_desired
|
||||
@auth_required
|
||||
def donate(v):
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}")
|
||||
if v and request.path.startswith('/logged_out'): return redirect(request.full_path.replace('/logged_out',''))
|
||||
|
||||
return render_template(f'donate_{SITE_NAME}.html', v=v)
|
|
@ -501,7 +501,7 @@ def sub_marsey(v, sub):
|
|||
return redirect(f'/h/{sub}/settings')
|
||||
|
||||
@app.get("/holes")
|
||||
@auth_desired_with_logingate
|
||||
@auth_required
|
||||
def subs(v):
|
||||
subs = g.db.query(Sub, func.count(Submission.sub)).outerjoin(Submission, Sub.name == Submission.sub).group_by(Sub.name).order_by(func.count(Submission.sub).desc()).all()
|
||||
return render_template('sub/subs.html', v=v, subs=subs)
|
||||
|
|
|
@ -935,12 +935,6 @@ def visitors(v):
|
|||
@auth_desired_with_logingate
|
||||
def u_username(username, v=None):
|
||||
|
||||
if not v and not request.path.startswith('/logged_out'):
|
||||
return redirect(f"/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'):
|
||||
return redirect(request.full_path.replace('/logged_out',''))
|
||||
|
||||
u = get_user(username, v=v, rendered=True)
|
||||
|
||||
if v and username == v.username:
|
||||
|
@ -1042,12 +1036,6 @@ def u_username(username, v=None):
|
|||
@auth_desired_with_logingate
|
||||
def u_username_comments(username, v=None):
|
||||
|
||||
if not v and not request.path.startswith('/logged_out'):
|
||||
return redirect(f"/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'):
|
||||
return redirect(request.full_path.replace('/logged_out',''))
|
||||
|
||||
user = get_user(username, v=v, rendered=True)
|
||||
|
||||
if v and username == v.username:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div style="height:10vh" data-bs-dismiss="modal"></div>
|
||||
|
||||
<a href="/" rel="nofollow noopener noreferrer" target="_blank" id="desktop-expanded-image-wrap-link">
|
||||
<img loading="lazy" alt="expanded image" referrerpolicy="no-referrer" src="" class="img-fluid rounded" id="desktop-expanded-image" style="min-width: 250px;min-width: min(250px,50vw)">
|
||||
<img loading="lazy" alt="expanded image" referrerpolicy="no-referrer" src="" class="img-fluid rounded" id="desktop-expanded-image" style="min-width: 250px;min-width: min(250px,50vw);border:5px white solid">
|
||||
</a>
|
||||
|
||||
<div style="height:10vh" data-bs-dismiss="modal"></div>
|
||||
|
|
|
@ -2989,8 +2989,6 @@ it's cool if it's not your thing, but don't yuck someone else's yum :)
|
|||
{[para]}
|
||||
https://rdrama.net/videos/16624761306946733.mp4
|
||||
{[para]}
|
||||
@joebiden @soren @duck
|
||||
{[para]}
|
||||
TRANS LIVES MATTER
|
||||
{[para]}
|
||||
![](/images/16628662340977426.webp)
|
||||
|
|
Loading…
Reference in New Issue