forked from rDrama/rDrama
fMerge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
59071d3cb3
|
@ -274,7 +274,7 @@ def api_comment(v):
|
||||||
return {"error": "Invalid name!"}, 403
|
return {"error": "Invalid name!"}, 403
|
||||||
|
|
||||||
if "author" in marsey: author_id = get_user(marsey["author"]).id
|
if "author" in marsey: author_id = get_user(marsey["author"]).id
|
||||||
elif "author_id" in marsey: author_id = marsey["author_id"]
|
elif "author_id" in marsey: author_id = int(marsey["author_id"])
|
||||||
else: abort(400)
|
else: abort(400)
|
||||||
|
|
||||||
existing = g.db.query(Marsey.name).filter_by(name=name).one_or_none()
|
existing = g.db.query(Marsey.name).filter_by(name=name).one_or_none()
|
||||||
|
|
|
@ -137,7 +137,7 @@ def notifications(v):
|
||||||
@app.get("/logged_out/s/<sub>")
|
@app.get("/logged_out/s/<sub>")
|
||||||
@limiter.limit("3/second;30/minute;1000/hour;5000/day")
|
@limiter.limit("3/second;30/minute;1000/hour;5000/day")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def front_all(v, sub=None):
|
def front_all(v, sub=None, subdomain=None):
|
||||||
if sub: sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none()
|
if sub: sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none()
|
||||||
|
|
||||||
if request.path.startswith('/s/') and not sub: abort(404)
|
if request.path.startswith('/s/') and not sub: abort(404)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<script src="/static/assets/js/bootstrap.js?v=245"></script>
|
<script src="/static/assets/js/bootstrap.js?v=245"></script>
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if sub and sub.css and not request.path.endswith('settings') %}
|
{% if sub and sub.css and not request.path.endswith('settings') %}
|
||||||
|
|
|
@ -94,4 +94,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/assets/js/emoji_modal.js?v=256"></script>
|
<script src="/static/assets/js/emoji_modal.js?v=257"></script>
|
|
@ -6,7 +6,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row justify-content-around">
|
<div class="row justify-content-around">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<title>2-Step Login - {{SITE_NAME}}</title>
|
<title>2-Step Login - {{SITE_NAME}}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
|
|
||||||
<label for="title">Sub Name</label>
|
<label for="title">Sub Name</label>
|
||||||
|
|
||||||
<input class="form-control" id="title-register" aria-describedby="titleHelpRegister" type="text" name="name" required>
|
<input minlength="3" maxlength="20" pattern='[a-zA-Z0-9_\-]*' class="form-control" id="title-register" aria-describedby="titleHelpRegister" type="text" name="name" required>
|
||||||
<small class="form-text text-muted">Names must be 3-20 characters</small>
|
<small class="form-text text-muted">3-20 characters, including letters, numbers, _ , and -</small>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
{% if v.mods(sub.name) %}
|
{% if v.mods(sub.name) %}
|
||||||
<form action="/s/{{sub.name}}/add_mod" method="post">
|
<form action="/s/{{sub.name}}/add_mod" method="post">
|
||||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}" >
|
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}" >
|
||||||
<input class="form-control" style="display:inline;width:25%" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username..">
|
<input class="form-control" style="display:inline;width:250px" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username..">
|
||||||
<input class="btn btn-primary" style="margin-top:-5px" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod">
|
<input class="btn btn-primary" style="margin-top:-5px" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod">
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=167">
|
<link rel="stylesheet" href="/static/assets/css/main.css?v=168">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -88,7 +88,9 @@
|
||||||
<option value="{{s}}"></option>
|
<option value="{{s}}"></option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</datalist>
|
</datalist>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mt-1" style="font-size: min(3.5vw,14px)"><span style="color:#ffcccb ">WARNING</span>: selecting a sub considerably limits the number of people who will see your post. Don't select a sub unless that's what you want.</div>
|
||||||
|
|
||||||
<label class='mt-4' for="title">Post Title</label>
|
<label class='mt-4' for="title">Post Title</label>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue