master
Aevann1 2021-07-26 22:12:30 +02:00
parent 96dea77c89
commit d1467685a4
3 changed files with 20 additions and 52 deletions

View File

@ -321,7 +321,6 @@ class User(Base, Stndrd, Age_times):
g.db.add(x)
output.append(x.comment_id)
g.db.commit()
return output
def notification_commentlisting(self, page=1, all_=False):

View File

@ -4,8 +4,8 @@ from drama.helpers.alerts import *
@app.route("/badmins", methods=["GET"])
@app.route("/api/vue/admin/mods", methods=["GET"])
@app.route("/api/v1/admin/mods", methods=["GET"])
@app.route("/api/vue/admins", methods=["GET"])
@app.route("/api/v1/admins", methods=["GET"])
@auth_desired
@public("read")
def badmins(v):
@ -193,28 +193,6 @@ def googleplayapp():
def serviceworker():
with open(".well-known/service-worker.js", "r") as f: return Response(f.read(), mimetype='application/javascript')
@app.route("/badmins", methods=["GET"])
@auth_desired
def help_admins(v):
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
admins = g.db.query(User).filter(
User.admin_level > 1,
User.id > 1).order_by(
User.id.asc()).all()
admins = [x for x in admins]
exadmins = g.db.query(User).filter_by(
admin_level=1).order_by(
User.id.asc()).all()
exadmins = [x for x in exadmins]
return render_template("admins.html",
v=v,
admins=admins,
exadmins=exadmins
)
@app.route("/settings/security", methods=["GET"])
@auth_required

View File

@ -3,32 +3,23 @@
{% block pagetitle %}Badmins{% endblock %}
{% block content %}
<pre class="d-none d-md-inline-block"></pre>
<h5 style="font-weight:bold;">Badmins</h5>
<pre></pre>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">Name</th>
</tr>
</thead>
{% for user in badmins %}
<tr>
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}">{{user.username}}</a></td>
</tr>
{% endfor %}
</table>
<pre>
<div class="row justify-content-around">
<div class="card mb-5">
<table class="table table-hover rounded mb-0">
<thead class="thead-dark">
<tr>
<th scope="col">User</th>
<th scope="col">Badmin Since</th>
<th scope="col"></th>
</tr>
</thead>
<tbody class="text-muted">
{% for badmin in badmins %}
<tr style="font-size:12.5px">
<td>
<a href="{{badmin.permalink}}">
<img src="{{badmin.profile_url}}" class="profile-pic-20 align-top mr-2">@{{badmin.username}}</a>
</td>
</tr>
{% else %}
<td>There are no badmins.</td>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}
</pre>
{% endblock %}