dg
This commit is contained in:
parent
f349ddc755
commit
4c468d63db
13 changed files with 30 additions and 16 deletions
|
@ -2694,6 +2694,12 @@ pre {
|
||||||
.text-small {
|
.text-small {
|
||||||
font-size: 12px !important;
|
font-size: 12px !important;
|
||||||
}
|
}
|
||||||
|
@media (max-width: 767.98px) {
|
||||||
|
.text-small {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.text-small-extra {
|
.text-small-extra {
|
||||||
font-size: 10.1px !important;
|
font-size: 10.1px !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -402,6 +402,10 @@ def message2(v, username):
|
||||||
|
|
||||||
if v.admin_level <= 1 and hasattr(user, 'is_blocked') and user.is_blocked: return {"error": "This user is blocking you."}, 403
|
if v.admin_level <= 1 and hasattr(user, 'is_blocked') and user.is_blocked: return {"error": "This user is blocking you."}, 403
|
||||||
|
|
||||||
|
if v.is_banned and not v.unban_utc: return render_template('errors/500.html', error=True, v=v), 500
|
||||||
|
|
||||||
|
if v.shadowbanned: return redirect(f"/@{username}")
|
||||||
|
|
||||||
message = request.values.get("message", "").strip()[:1000].strip()
|
message = request.values.get("message", "").strip()[:1000].strip()
|
||||||
|
|
||||||
if 'linkedin.com' in message: return {"error": "this domain 'linkedin.com' is banned"}
|
if 'linkedin.com' in message: return {"error": "this domain 'linkedin.com' is banned"}
|
||||||
|
@ -466,6 +470,10 @@ def message3(v, username):
|
||||||
if v.admin_level <= 1 and hasattr(user, 'is_blocked') and user.is_blocked:
|
if v.admin_level <= 1 and hasattr(user, 'is_blocked') and user.is_blocked:
|
||||||
return {"error": "This user is blocking you."}, 403
|
return {"error": "This user is blocking you."}, 403
|
||||||
|
|
||||||
|
if v.is_banned and not v.unban_utc: return {"error": "Internal server error"}, 500
|
||||||
|
|
||||||
|
if v.shadowbanned: return {"message": "Message sent!"}
|
||||||
|
|
||||||
message = request.values.get("message", "").strip()[:1000].strip()
|
message = request.values.get("message", "").strip()[:1000].strip()
|
||||||
|
|
||||||
if 'linkedin.com' in message: return {"error": "This domain 'linkedin.com' is banned."}, 403
|
if 'linkedin.com' in message: return {"error": "This domain 'linkedin.com' is banned."}, 403
|
||||||
|
|
|
@ -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?a=63"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=63"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<script src="/static/assets/js/bootstrap.js?a=3"></script>
|
<script src="/static/assets/js/bootstrap.js?a=3"></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?a=63">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=63"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<nav class="shadow shadow-md fixed-top">
|
<nav class="shadow shadow-md fixed-top">
|
||||||
{% if request.host == "rdrama.net" %}
|
{% if request.host == "rdrama.net" %}
|
||||||
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;">
|
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;">
|
||||||
<a style="color: white" href="https://reddit.com/r/SubredditDrama">Welcome to rdrama.net: /r/SubredditDrama official site</a>
|
<a style="color: white" class="text-small-mobile" href="https://reddit.com/r/SubredditDrama">Welcome to rdrama.net: the official site for /r/SubredditDrama</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="navbar navbar-expand-md navbar-light" id="navbar">
|
<div class="navbar navbar-expand-md navbar-light" id="navbar">
|
||||||
|
|
|
@ -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?a=63"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=63"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row justify-content-around">
|
<div class="row justify-content-around">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=63">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -14,7 +14,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="/static/assets/css/main.css?a=63"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
|
|
||||||
</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?a=63"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
||||||
{% 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?a=63"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=63"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,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="/static/assets/css/main.css?a=63"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,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="/static/assets/css/main.css?a=63"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -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?a=63"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=9">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=63">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=64">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
<link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue