forked from rDrama/rDrama
fsdfsf
parent
54e8fa9284
commit
33d9602b84
|
@ -23,6 +23,14 @@ from files.helpers.discord import add_role
|
||||||
IMGUR_KEY = environ.get("IMGUR_KEY", "").strip()
|
IMGUR_KEY = environ.get("IMGUR_KEY", "").strip()
|
||||||
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/truescore")
|
||||||
|
@admin_level_required(6)
|
||||||
|
def truescore(v):
|
||||||
|
users = g.db.query(User).options(lazyload('*')).order_by(User.truecoins.desc()).limit(25).all()
|
||||||
|
return render_template("truescore.html", v=v, users1=users)
|
||||||
|
|
||||||
|
|
||||||
@app.post("/@<username>/revert_actions")
|
@app.post("/@<username>/revert_actions")
|
||||||
@admin_level_required(6)
|
@admin_level_required(6)
|
||||||
def revert_actions(v, username):
|
def revert_actions(v, username):
|
||||||
|
|
|
@ -152,6 +152,7 @@ def leaderboard(v):
|
||||||
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5, users6=users6)
|
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5, users6=users6)
|
||||||
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5)
|
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/@<username>/css")
|
@app.get("/@<username>/css")
|
||||||
def get_css(username):
|
def get_css(username):
|
||||||
user = get_user(username)
|
user = get_user(username)
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
{% extends "settings2.html" %}
|
||||||
|
|
||||||
|
{% block pagetitle %}Truescore Leaderboard{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<pre class="d-none d-md-inline-block"></pre>
|
||||||
|
<h5 style="font-weight:bold;text-align: center;">Top 25 by truescore</h5>
|
||||||
|
<pre></pre>
|
||||||
|
<table class="table table-striped mb-5">
|
||||||
|
<thead class="bg-primary text-white">
|
||||||
|
<tr>
|
||||||
|
<th style="font-weight:bold;">#</th>
|
||||||
|
<th style="font-weight:bold;">Name</th>
|
||||||
|
<th style="font-weight:bold; text-align:right;">Score</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
{% for user in users %}
|
||||||
|
<tr>
|
||||||
|
<td style="font-weight:bold;">{{users.index(user)+1}}</td>
|
||||||
|
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img loading="lazy" 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>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue