This commit is contained in:
Aevann1 2021-07-30 17:00:27 +02:00
parent eb42b54e47
commit c31f2ecee0
3 changed files with 6 additions and 2 deletions

View file

@ -28,7 +28,7 @@ class User(Base, Stndrd, Age_times):
highres = Column(String)
profileurl = Column(String)
bannerurl = Column(String)
patron = Column(Boolean, default=False)
patron = Column(Integer, default=0)
animatedname = Column(Boolean, default=False)
email = Column(String)
css = deferred(Column(String))

View file

@ -206,7 +206,7 @@ def badge_grant_post(v):
send_notification(1046, user, text)
if badge_id in [21,22,23,24,28]:
user.patron = True
user.patron = int(str(badge_id)[-1])
user.animatedname = True
if badge_id == 23: user.banawards = 1
elif badge_id in [24,28]: user.banawards = 3

View file

@ -6,6 +6,7 @@
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold;">Tier</th>
<th style="font-weight:bold;">Ban awards</th>
</tr>
</thead>
@ -13,6 +14,9 @@
<tr>
<td style="font-weight:bold;">{{users.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
<td style="font-weight:bold;">{% if self.has_badge() %}{{user.banawards}}{% endif %}</td>
<td style="font-weight:bold;">{% if user.banawards %}{{user.banawards}}{% endif %}</td>
</tr>
{% endfor %}