sfd
This commit is contained in:
parent
82d77d9c14
commit
651a9e00bf
2 changed files with 9 additions and 0 deletions
|
@ -12,6 +12,7 @@ from .subscriptions import *
|
|||
from .userblock import *
|
||||
from .badges import *
|
||||
from .clients import *
|
||||
from .mod_logs import *
|
||||
from files.__main__ import Base, cache
|
||||
from files.helpers.security import *
|
||||
import random
|
||||
|
@ -363,6 +364,12 @@ class User(Base):
|
|||
|
||||
return sorted(list(awards.values()), key=lambda x: x['kind'], reverse=True)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def modaction_num(self):
|
||||
if self.admin_level < 2: return 0
|
||||
return g.db.query(ModAction.id).filter_by(user_id=self.id).count()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def notifications_count(self):
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<th style="font-weight:bold;">#</th>
|
||||
<th style="font-weight:bold;">Name</th>
|
||||
<th style="font-weight:bold; text-align:right;">Score</th>
|
||||
<th style="font-weight:bold; text-align:right;">Mod actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for user in admins %}
|
||||
|
@ -19,6 +20,7 @@
|
|||
<td style="font-weight:bold;">{{loop.index}}</td>
|
||||
<td><a style="color:#{{user.namecolor}};font-weight:bold;" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a>{% if user.admin_level == 1 and v and v.admin_level > 1 %}<i class="fas fa-broom align-middle ml-2 color-white" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Meme Admin"></i>{% endif %}</td>
|
||||
<td style="font-weight:bold; text-align:right;">{{user.truecoins}}</td>
|
||||
<td style="font-weight:bold; text-align:right;">{{user.modaction_num}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue