consistency
parent
5a8ea454d7
commit
8186a9fbc7
|
@ -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
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue