forked from rDrama/rDrama
sfd
parent
1279734995
commit
c527d848ac
|
@ -12,6 +12,7 @@ from .subscriptions import *
|
||||||
from .userblock import *
|
from .userblock import *
|
||||||
from .badges import *
|
from .badges import *
|
||||||
from .clients import *
|
from .clients import *
|
||||||
|
from .mod_logs import *
|
||||||
from files.__main__ import Base, cache
|
from files.__main__ import Base, cache
|
||||||
from files.helpers.security import *
|
from files.helpers.security import *
|
||||||
import random
|
import random
|
||||||
|
@ -363,6 +364,12 @@ class User(Base):
|
||||||
|
|
||||||
return sorted(list(awards.values()), key=lambda x: x['kind'], reverse=True)
|
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
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def notifications_count(self):
|
def notifications_count(self):
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<th style="font-weight:bold;">#</th>
|
<th style="font-weight:bold;">#</th>
|
||||||
<th style="font-weight:bold;">Name</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;">Score</th>
|
||||||
|
<th style="font-weight:bold; text-align:right;">Mod actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for user in admins %}
|
{% for user in admins %}
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
<td style="font-weight:bold;">{{loop.index}}</td>
|
<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><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.truecoins}}</td>
|
||||||
|
<td style="font-weight:bold; text-align:right;">{{user.modaction_num}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue