remotes/1693045480750635534/spooky-22
Aevann1 2022-04-18 23:11:30 +02:00
parent 0705e96770
commit f3743d717d
15 changed files with 41 additions and 19 deletions

View File

@ -280,6 +280,11 @@ ACTIONTYPES = {
"icon": 'fa-sack-dollar',
"color": 'bg-success'
},
'move_hole': {
"str": 'moved {self.target_link} to <a href="/h/{self.target_post.sub}">/h/{self.target_post.sub}</a>',
"icon": 'fa-manhole',
"color": 'bg-primary'
},
'nuke_user': {
"str": 'removed all content of {self.target_link}',
"icon": 'fa-radiation-alt',

View File

@ -38,6 +38,15 @@ def api_flag_post(pid, v):
_note=f'"{post.flair}"'
)
g.db.add(ma)
elif reason.startswith('/h/') and v.admin_level > 2:
post.sub = reason[3:]
g.db.add(post)
ma=ModAction(
kind="move_hole",
user_id=v.id,
target_submission_id=post.id,
)
g.db.add(ma)
else:
flag = Flag(post_id=post.id, user_id=v.id, reason=reason)
g.db.add(flag)

View File

@ -271,7 +271,7 @@ def remove_mod(v, sub):
@app.get("/create_sub")
@is_not_permabanned
def create_sub(v):
if SITE_NAME == 'rDrama' and v.id not in (AEVANN_ID, CARP_ID): abort(403)
if SITE_NAME == 'rDrama' and v.admin_level < 3: abort(403)
if request.host == 'rdrama.net': cost = 0
else:
@ -286,7 +286,7 @@ def create_sub(v):
@app.post("/create_sub")
@is_not_permabanned
def create_sub2(v):
if SITE_NAME == 'rDrama' and v.id not in (AEVANN_ID, CARP_ID): abort(403)
if SITE_NAME == 'rDrama' and v.admin_level < 3: abort(403)
name = request.values.get('name')
if not name: abort(400)

View File

@ -15,7 +15,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
{% if v.agendaposter %}
<style>
html {
@ -39,7 +39,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
{% endif %}
</head>

View File

@ -14,7 +14,7 @@
<title>Chat</title>
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238">
<link rel="stylesheet" href="/assets/css/main.css?v=239">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
{% if v.css %}
<link rel="stylesheet" href="/@{{v.username}}/css">

View File

@ -7,7 +7,7 @@
<script src="/assets/js/bootstrap.js?v=245"></script>
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238">
<link rel="stylesheet" href="/assets/css/main.css?v=239">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
{% if v.agendaposter %}
<style>
@ -32,7 +32,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238">
<link rel="stylesheet" href="/assets/css/main.css?v=239">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
{% endif %}

View File

@ -40,8 +40,16 @@
{% if sub %}
<a href="/h/{{sub.name}}" class="font-weight-bold ml-2 flex-grow-1 mt-1" style="font-size:max(14px,1.2vw)">/h/{{sub.name}}</a>
{% elif SITE_NAME == 'rDrama' %}
<style>
@media (min-width: 350px) {
#logo {
height: 20px;
width: 97px;
}
}
</style>
<a href="/" class="flex-grow-1">
<img alt="logo" src="/assets/images/{{SITE_NAME}}/logo.webp?v=1011" height=15 width=73>
<img id="logo" alt="logo" src="/assets/images/{{SITE_NAME}}/logo.webp?v=1011" height=15 width=73>
</a>
{% endif %}

View File

@ -6,7 +6,7 @@
{% block content %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
{% if v.agendaposter %}
<style>
html {
@ -30,7 +30,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
{% endif %}
<div class="row justify-content-around">

View File

@ -18,7 +18,7 @@
{% endblock %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238">
<link rel="stylesheet" href="/assets/css/main.css?v=239">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
</head>

View File

@ -14,7 +14,7 @@
<title>2-Step Login - {{SITE_NAME}}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
</head>

View File

@ -34,7 +34,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
{% if v.agendaposter %}
<style>
html {

View File

@ -39,10 +39,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=55">
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
{% endif %}
</head>

View File

@ -28,7 +28,7 @@
{% endif %}
</div>
{% if v.id in (AEVANN_ID,CARP_ID) %}
{% if v.admin_level > 2 %}
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
{% endif %}
{% if v.mods(sub.name) %}
@ -40,7 +40,7 @@
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/exilees">HOLE EXILEES</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/blockers">HOLE BLOCKERS</a>
{% else %}
{% if v and v.id in (AEVANN_ID,CARP_ID) %}
{% if v and v.admin_level > 2 %}
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/post/16583">EMOJI MEGATHREAD</a>

View File

@ -31,7 +31,7 @@
<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>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
</head>

View File

@ -32,7 +32,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=238"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
<link rel="stylesheet" href="/assets/css/main.css?v=239"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=55">
</head>