remotes/1693045480750635534/spooky-22
Aevann1 2021-08-18 17:32:27 +02:00
parent 9f94d44b89
commit 464e7ef2af
6 changed files with 17 additions and 14 deletions

View File

@ -14,10 +14,11 @@ ROLES={
"feedback": "850716291714383883",
"newuser": "854783259229421589",
"norep": "850971811918512208",
"paypig": "868129042346414132",
"renthog": "875569477671067688",
"landchad": "869434199575236649",
"turboautist": "868140288013664296",
"1": "868129042346414132",
"2": "875569477671067688",
"3": "869434199575236649",
"4": "868140288013664296",
"8": "868140288013664296",
}
def discord_wrap(f):

View File

@ -120,6 +120,8 @@ def discord_redirect(v):
time.sleep(0.1)
if v.patron: add_role(v, str(v.patron))
add_role(v, "feedback")
time.sleep(0.1)

View File

@ -46,11 +46,11 @@ def patrons(v):
users = [x for x in g.db.query(User).filter(User.patron > 0).order_by(User.patron.desc()).all()]
return render_template("patrons.html", v=v, users=users)
@app.get("/badmins")
@app.get("/admins")
@auth_desired
def badmins(v):
badmins = g.db.query(User).filter_by(admin_level=6).order_by(User.coins.desc()).all()
return render_template("badmins.html", v=v, badmins=badmins)
def admins(v):
admins = g.db.query(User).filter_by(admin_level=6).order_by(User.coins.desc()).all()
return render_template("admins.html", v=v, admins=admins)
@app.get("/log")
@auth_desired

View File

@ -30,7 +30,7 @@
<h2 class="mt-3">Granted Badges</h2>
<div>These badges can be granted by badmins.</div>
<div>These badges can be granted by admins.</div>
<pre></pre>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">

View File

@ -1,10 +1,10 @@
{% extends "settings2.html" %}
{% block pagetitle %}Badmins{% endblock %}
{% block pagetitle %}admins{% endblock %}
{% block content %}
<pre class="d-none d-md-inline-block"></pre>
<h5 style="font-weight:bold;">Badmins</h5>
<h5 style="font-weight:bold;">admins</h5>
<pre></pre>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
@ -13,7 +13,7 @@
<th style="font-weight:bold; text-align:right;">Coins</th>
</tr>
</thead>
{% for user in badmins %}
{% for user in admins %}
<tr>
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold; text-align:right;">{{user.coins}}</td>

View File

@ -98,7 +98,7 @@
<a class="nav-link{% if request.path.endswith('/leaderboard') %} active{% endif %}" href="/leaderboard"><i class="fas fa-trophy"></i>Leaderboard</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path.endswith('/badmins') %} active{% endif %}" href="/badmins"><i class="fas fa-crown"></i>Badmins</a>
<a class="nav-link{% if request.path.endswith('/admins') %} active{% endif %}" href="/admins"><i class="fas fa-crown"></i>admins</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path.endswith('/log') %} active{% endif %}" href="/log"><i class="fas fa-scroll-old"></i>Moderation Log</a>
@ -130,7 +130,7 @@
<a style="padding: 0.75rem 1rem;" class="nav-link{% if request.path.endswith('/leaderboard') %} active{% endif %}" href="/leaderboard"><i class="fas fa-trophy text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem;" class="nav-link{% if request.path.endswith('/badmins') %} active{% endif %}" href="/badmins"><i class="fas fa-crown text-lg mr-0"></i></a>
<a style="padding: 0.75rem 1rem;" class="nav-link{% if request.path.endswith('/admins') %} active{% endif %}" href="/admins"><i class="fas fa-crown text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem;" class="nav-link{% if request.path.endswith('/log') %} active{% endif %}" href="/log"><i class="fas fa-scroll-old text-lg mr-0"></i></a>