forked from rDrama/rDrama
master
parent
96dea77c89
commit
d1467685a4
|
@ -321,7 +321,6 @@ class User(Base, Stndrd, Age_times):
|
||||||
g.db.add(x)
|
g.db.add(x)
|
||||||
output.append(x.comment_id)
|
output.append(x.comment_id)
|
||||||
|
|
||||||
g.db.commit()
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def notification_commentlisting(self, page=1, all_=False):
|
def notification_commentlisting(self, page=1, all_=False):
|
||||||
|
|
|
@ -4,8 +4,8 @@ from drama.helpers.alerts import *
|
||||||
|
|
||||||
|
|
||||||
@app.route("/badmins", methods=["GET"])
|
@app.route("/badmins", methods=["GET"])
|
||||||
@app.route("/api/vue/admin/mods", methods=["GET"])
|
@app.route("/api/vue/admins", methods=["GET"])
|
||||||
@app.route("/api/v1/admin/mods", methods=["GET"])
|
@app.route("/api/v1/admins", methods=["GET"])
|
||||||
@auth_desired
|
@auth_desired
|
||||||
@public("read")
|
@public("read")
|
||||||
def badmins(v):
|
def badmins(v):
|
||||||
|
@ -193,28 +193,6 @@ def googleplayapp():
|
||||||
def serviceworker():
|
def serviceworker():
|
||||||
with open(".well-known/service-worker.js", "r") as f: return Response(f.read(), mimetype='application/javascript')
|
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"])
|
@app.route("/settings/security", methods=["GET"])
|
||||||
@auth_required
|
@auth_required
|
||||||
|
|
|
@ -3,32 +3,23 @@
|
||||||
{% block pagetitle %}Badmins{% endblock %}
|
{% block pagetitle %}Badmins{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<pre class="d-none d-md-inline-block"></pre>
|
||||||
<div class="row justify-content-around">
|
<h5 style="font-weight:bold;">Badmins</h5>
|
||||||
|
<pre></pre>
|
||||||
<div class="card mb-5">
|
<table class="table table-striped mb-5">
|
||||||
<table class="table table-hover rounded mb-0">
|
<thead class="bg-primary text-white">
|
||||||
<thead class="thead-dark">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">User</th>
|
<th style="font-weight:bold;">Name</th>
|
||||||
<th scope="col">Badmin Since</th>
|
|
||||||
<th scope="col"></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="text-muted">
|
{% for user in badmins %}
|
||||||
{% for badmin in badmins %}
|
<tr>
|
||||||
<tr style="font-size:12.5px">
|
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}">{{user.username}}</a></td>
|
||||||
<td>
|
|
||||||
<a href="{{badmin.permalink}}">
|
|
||||||
<img src="{{badmin.profile_url}}" class="profile-pic-20 align-top mr-2">@{{badmin.username}}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% else %}
|
{% endfor %}
|
||||||
<td>There are no badmins.</td>
|
</table>
|
||||||
{% endfor %}
|
<pre>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue