remotes/1693045480750635534/spooky-22
Aevann1 2021-07-23 17:25:47 +02:00
parent 35e81adfaf
commit 3a7bddc9ed
2 changed files with 31 additions and 33 deletions

View File

@ -67,6 +67,7 @@ def settings_profile_post(v):
if request.values.get("animatedname", v.animatedname) != v.animatedname:
if v.animatedname == False:
users1, users2 = leaderboard()
print(users1)
if v not in users1 and v not in users2: return jsonify({"error": "You must be in the leaderboard to apply animated name!"}), 403
updated = True
v.animatedname = request.values.get("animatedname", None) == 'true'

View File

@ -338,14 +338,14 @@
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="animatedname">Animated Username</label>
</div>
<div class="body w-lg-100">
<div class="body d-lg-flex border-bottom">
<label for="bio" class="text-black w-lg-25">Animated Username</label>
<div class="w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="animatedname" name="animatedname"{% if v.animatedname%} checked{% endif %} onchange="post_toast('/settings/profile?animatedname='+document.getElementById('animatedname').checked)">
@ -353,14 +353,11 @@
</div>
<span class="text-small-extra text-muted">Enable animated username (only available to users in the leaderboard and patrons)</span>
</div>
</div>
</div>
{% if not v.flairchanged %}
<div class="body d-lg-flex border-bottom">