mirror of
https://github.com/csd4ni3l/grass_touching_captcha.git
synced 2026-01-01 20:43:45 +01:00
add red color to people who got banned on leaderboard
This commit is contained in:
2
main.py
2
main.py
@@ -189,7 +189,7 @@ def leaderboard():
|
|||||||
|
|
||||||
cur = get_db().cursor()
|
cur = get_db().cursor()
|
||||||
|
|
||||||
cur.execute("SELECT grass_touching_count, username FROM USERS ORDER BY grass_touching_count DESC, username ASC LIMIT 25")
|
cur.execute("SELECT grass_touching_count, banned, username FROM USERS ORDER BY grass_touching_count DESC, username ASC LIMIT 25")
|
||||||
|
|
||||||
users = cur.fetchall()
|
users = cur.fetchall()
|
||||||
if not users:
|
if not users:
|
||||||
|
|||||||
@@ -49,8 +49,8 @@
|
|||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
{% for user in users %}
|
{% for user in users %}
|
||||||
<li class="list-group-item d-flex justify-content-between align-items-center
|
<li class="list-group-item d-flex justify-content-between align-items-center
|
||||||
{% if user.1 == current_username %}list-group-item-success fw-bold{% endif %}">
|
{% if user.2 == current_username %}list-group-item-success fw-bold{% endif %} {% if user.1 %}list-group-item-danger{% endif %}">
|
||||||
<span>{{ loop.index }}. {{ user.1 }} ({{ user.0 }})</span>
|
<span>{{ loop.index }}. {{ user.2 }} ({{ user.0 }})</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user