forked from rDrama/rDrama
1
0
Fork 0

consistency

master
Aevann 2024-02-03 01:15:04 +02:00
parent 5a8ea454d7
commit 8186a9fbc7
3 changed files with 4 additions and 4 deletions

View File

@ -1256,8 +1256,8 @@ class User(Base):
@property
@lazy
def shadowbanner(self):
return g.db.query(User.username).filter_by(id=self.shadowbanned).one()[0]
def shadowbanned_by(self):
return '@' + g.db.query(User.username).filter_by(id=self.shadowbanned).one()[0]
@property
@lazy

View File

@ -1,3 +1,3 @@
{% if user.shadowbanned and v and v.admin_level >= PERMS['USER_SHADOWBAN'] %}
<i class="fas fa-user-times text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title='Shadowbanned by @{{user.shadowbanner}} for "{{user.ban_reason}}"' data-bs-html="true"></i>
<i class="fas fa-user-times text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title='Shadowbanned by {{user.shadowbanned_by}} for "{{user.ban_reason}}"' data-bs-html="true"></i>
{% endif %}

View File

@ -25,7 +25,7 @@
<h5 class="text-primary" id="profile-{{deviceType}}--shadowbanned">SHADOWBANNED USER:
{{u.ban_reason | safe}}
(by <a href="/@{{u.shadowbanner}}">@{{u.shadowbanner}}</a>)
(by <a href="/{{u.shadowbanned_by}}">{{u.shadowbanned_by}}</a>)
</h5>
{% endif %}
{% endmacro %}