Merge branch 'frost' into blitzen
This commit is contained in:
commit
4b0bda1f8e
23 changed files with 35 additions and 34 deletions
|
@ -4462,7 +4462,6 @@ div.deleted.banned {
|
|||
}
|
||||
.container, .container-fluid {
|
||||
background-color: var(--gray-700) !important;
|
||||
border-radius: 5px !important;
|
||||
}
|
||||
.btn {
|
||||
background-color: var(--gray-700) !important;
|
||||
|
|
|
@ -4,10 +4,10 @@ from files.helpers.const import *
|
|||
|
||||
|
||||
def get_logged_in_user():
|
||||
token = request.headers.get("Authorization")
|
||||
token = request.headers.get("Authorization","").strip()
|
||||
|
||||
if token:
|
||||
client = g.db.query(ClientAuth).filter(ClientAuth.access_token == token).first()
|
||||
client = g.db.query(ClientAuth).filter(ClientAuth.access_token == token).one_or_none()
|
||||
if not client: return None
|
||||
|
||||
v = client.user
|
||||
|
@ -21,7 +21,7 @@ def get_logged_in_user():
|
|||
if not uid or not logged_in or uid != logged_in: return None
|
||||
|
||||
try:
|
||||
if g.db: v = g.db.query(User).filter_by(id=uid).one_or_none()
|
||||
if g.db: v = g.db.query(User).filter_by(id=logged_in).one_or_none()
|
||||
else: return None
|
||||
except: return None
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ def award_post(pid, v):
|
|||
link = f"[this post]({post.permalink})"
|
||||
send_repeatable_notification(author.id, f"Your account has been suspended permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!")
|
||||
send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award on [{post.shortlink}]({post.shortlink})")
|
||||
send_repeatable_notification(DAD_ID, f"@{v.username} used {kind} award on [{post.shortlink}]({post.shortlink})")
|
||||
elif kind == "pin":
|
||||
if post.stickied and post.stickied.startswith("t:"): t = int(post.stickied[2:]) + 3600
|
||||
else: t = int(time.time()) + 3600
|
||||
|
@ -413,6 +414,7 @@ def award_comment(cid, v):
|
|||
link = f"[this comment]({c.permalink})"
|
||||
send_repeatable_notification(author.id, f"Your account has been suspended permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!")
|
||||
send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award on [{c.shortlink}]({c.shortlink})")
|
||||
send_repeatable_notification(DAD_ID, f"@{v.username} used {kind} award on [{c.shortlink}]({c.shortlink})")
|
||||
elif kind == "pin":
|
||||
if c.is_pinned and c.is_pinned.startswith("t:"): t = int(c.is_pinned[2:]) + 3600
|
||||
else: t = int(time.time()) + 3600
|
||||
|
|
|
@ -771,7 +771,7 @@ def submit_post(v):
|
|||
domain = parsed_url.netloc
|
||||
|
||||
qd = parse_qs(parsed_url.query)
|
||||
filtered = dict((k, v) for k, v in qd.items() if not k.startswith('utm_') and not k.startswith('ref_'))
|
||||
filtered = dict((k, val) for k, val in qd.items() if not k.startswith('utm_') and not k.startswith('ref_'))
|
||||
|
||||
new_url = ParseResult(scheme="https",
|
||||
netloc=parsed_url.netloc,
|
||||
|
|
|
@ -52,7 +52,7 @@ def sex(v):
|
|||
|
||||
users = g.db.query(User).filter(User.patron > 0, User.patron < 5).all()
|
||||
for u in users:
|
||||
if not u.email or u.email.lower() not in emails: print(u.username)
|
||||
if not u.email or u.email.lower() not in emails: print(f'{u.username} - {u.email}')
|
||||
|
||||
return "sex"
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=439"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{v.theme}}.css?v=200">
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=440"><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 %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=439"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=440"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
|
|
|
@ -186,9 +186,9 @@
|
|||
|
||||
{% block stylesheets %}
|
||||
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=439">
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=440">
|
||||
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=439">
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=440">
|
||||
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/mistletoe.css?v=400">
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
<title>Login - {{'SITE_NAME' | app_config}}</title>
|
||||
{% endblock %}
|
||||
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=439">
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=440">
|
||||
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=439">
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=440">
|
||||
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
|
||||
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=439"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=440"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
{% block stylesheets %}
|
||||
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=439">
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=440">
|
||||
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=439">
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=440">
|
||||
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/mistletoe.css?v=400">
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=439">
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=440">
|
||||
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=439">
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=440">
|
||||
|
||||
<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>
|
||||
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=439"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?v=440"><link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?v=200">
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=439">
|
||||
<link rel="stylesheet" href="/static/dist/main.css?v=440">
|
||||
|
||||
<title>Flask + Tailwind CSS</title>
|
||||
</head>
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
{% 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 %}
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<script src="/assets/js/bootstrap.js?v=190"></script>
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440">
|
||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
{% 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 %}
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
{% endif %}
|
||||
|
||||
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
{% block content %}
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
{% 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 %}
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
{% endif %}
|
||||
|
||||
<div class="row justify-content-around">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{% endblock %}
|
||||
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440">
|
||||
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
||||
|
||||
|
|
|
@ -13,7 +13,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=439"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
{% 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">
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
{% endif %}
|
||||
|
||||
<link href="/assets/css/fa.css?v=193" rel="stylesheet">
|
||||
|
|
|
@ -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>
|
||||
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
|
||||
</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>
|
||||
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
{% block stylesheets %}
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=191">
|
||||
{% 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 %}
|
||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=439">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=440">
|
||||
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=191">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue