diff --git a/files/classes/submission.py b/files/classes/submission.py index 4b5a1e8d3d..6d87b7da7e 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -424,7 +424,7 @@ class Submission(Base): @property @lazy def is_video(self): - return self.url and any((self.url.lower().endswith(x) for x in ('.mp4','.webm','.mov'))) + return self.url and any((self.url.lower().endswith(x) for x in ('.mp4','.webm','.mov', '#t=0.1'))) @property @lazy diff --git a/files/routes/static.py b/files/routes/static.py index 6dcab151c1..aeb770871e 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -29,13 +29,21 @@ def emojis(v): return render_template("marseys.html", v=v, marseys=marsey_counted) @app.get("/terms") -@auth_required +@app.get("/logged_out/terms") +@auth_desired def terms(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'): v = None + return render_template("terms.html", v=v) @app.get('/sidebar') -@auth_required +@app.get('/logged_out/sidebar') +@auth_desired 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'): v = None + return render_template('sidebar.html', v=v) diff --git a/files/templates/login.html b/files/templates/login.html index 9dfc0f6289..29177bf984 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -92,7 +92,7 @@ {% if g.webview %}
+ + + + + + + + +
Rules: No doxxing, No CP or other clearly illegal shit. Thanks.
++ + + + + + + + +\ No newline at end of file diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 0638e1e02e..57ff95f835 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -113,9 +113,9 @@ diff --git a/files/templates/submission.html b/files/templates/submission.html index 0b8ef9f56b..94a899d1cc 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -143,7 +143,7 @@ -{% if p.url and (p.url.lower().endswith('.mp4') or p.url.lower().endswith('.webm') or p.url.lower().endswith('.mov')) %} +{% if p.is_video %} {% endif %} @@ -168,7 +168,7 @@ {% if p.author %}{% endif %} -{% if p.url and (p.url.lower().endswith('.mp4') or p.url.lower().endswith('.webm') or p.url.lower().endswith('.mov')) %} +{% if p.url and p.is_video %} {% endif %} @@ -391,7 +391,7 @@