sneed
This commit is contained in:
parent
92e984f5f6
commit
b98a673646
2 changed files with 31 additions and 33 deletions
|
@ -67,6 +67,7 @@ def settings_profile_post(v):
|
||||||
if request.values.get("animatedname", v.animatedname) != v.animatedname:
|
if request.values.get("animatedname", v.animatedname) != v.animatedname:
|
||||||
if v.animatedname == False:
|
if v.animatedname == False:
|
||||||
users1, users2 = leaderboard()
|
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
|
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
|
updated = True
|
||||||
v.animatedname = request.values.get("animatedname", None) == 'true'
|
v.animatedname = request.values.get("animatedname", None) == 'true'
|
||||||
|
|
|
@ -314,53 +314,50 @@
|
||||||
|
|
||||||
<div class="body d-lg-flex border-bottom">
|
<div class="body d-lg-flex border-bottom">
|
||||||
|
|
||||||
<label for="bio" class="text-black w-lg-25">Name Color</label>
|
<label for="bio" class="text-black w-lg-25">Name Color</label>
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
|
|
||||||
<form action="/settings/namecolor" id="color-form" method="post" class="color-picker" style="line-height: 0">
|
<form action="/settings/namecolor" id="color-form" method="post" class="color-picker" style="line-height: 0">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
|
|
||||||
{% for color in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
|
{% for color in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
|
||||||
<input type="radio" name="color" id="color-{{color}}" value="{{color}}" {% if v.namecolor == color %}checked{% endif %} onclick="document.getElementById('color-form').submit()"/>
|
<input type="radio" name="color" id="color-{{color}}" value="{{color}}" {% if v.namecolor == color %}checked{% endif %} onclick="document.getElementById('color-form').submit()"/>
|
||||||
<label class="color-radio" for="color-{{color}}">
|
<label class="color-radio" for="color-{{color}}">
|
||||||
<span style="background-color: #{{color}}">
|
<span style="background-color: #{{color}}">
|
||||||
{% if v.namecolor.lower() == color %}
|
{% if v.namecolor.lower() == color %}
|
||||||
<i class="fas fa-check text-white"></i>
|
<i class="fas fa-check text-white"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="d-lg-flex border-bottom">
|
|
||||||
|
|
||||||
<div class="title w-lg-25">
|
|
||||||
<label for="animatedname">Animated Username</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="body w-lg-100">
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<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">
|
<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)">
|
<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)">
|
||||||
<label class="custom-control-label" for="animatedname"></label>
|
<label class="custom-control-label" for="animatedname"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="text-small-extra text-muted">Enable animated username (only available to users in the leaderboard and patrons)</span>
|
<span class="text-small-extra text-muted">Enable animated username (only available to users in the leaderboard and patrons)</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if not v.flairchanged %}
|
{% if not v.flairchanged %}
|
||||||
<div class="body d-lg-flex border-bottom">
|
<div class="body d-lg-flex border-bottom">
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue