This commit is contained in:
rimu 2025-01-06 21:23:33 +13:00
parent d27b6d8532
commit 3a526e0ca7
2 changed files with 3 additions and 9 deletions

View file

@ -1182,7 +1182,7 @@ def admin_users():
if last_seen > 0:
users = users.filter(User.last_seen > utcnow() - timedelta(days=last_seen))
users = users.order_by(text('"user".' + sort_by))
users = users.paginate(page=page, per_page=1000, error_out=False)
users = users.paginate(page=page, per_page=500, error_out=False)
next_url = url_for('admin.admin_users', page=users.next_num, search=search, local_remote=local_remote, sort_by=sort_by, last_seen=last_seen) if users.has_next else None
prev_url = url_for('admin.admin_users', page=users.prev_num, search=search, local_remote=local_remote, sort_by=sort_by, last_seen=last_seen) if users.has_prev and page != 1 else None

View file

@ -76,18 +76,12 @@
</tr>
{% for user in users.items %}
<tr>
<td><span title="{{ _('Name') }}">{{ render_username(user, add_domain=False) }}<br />
<a href="/u/{{ user.link() }}">{{ user.user_name }}</a>{% if not user.is_local() %}<wbr />@<a href="{{ user.ap_profile_id }}">{{ user.ap_domain }}</a>{% endif %}</span></td>
<td><span title="{{ _('Name') }}">{{ render_username(user) }}</span></td>
<td><span title="{{ _('Banned') }}">{{ '<span class="red">Banned</span>'|safe if user.banned }}
{{ '<span class="red">Banned posts</span>'|safe if user.ban_posts }}
{{ '<span class="red">Banned comments</span>'|safe if user.ban_comments }}</td>
<td>{{ user.reports if user.reports > 0 }} </td>
<td>{% if user.attitude %}{{ (user.attitude * 100) | round | int }}%{% endif %}</td>
<td>{% if user.reputation %}R {{ user.reputation | round | int }}{% endif %}</td>
<td><span title="{{ user.last_seen }}">{{ arrow.get(user.last_seen).humanize(locale=locale) }}</span></td>
{{ '<span class="red">Banned comments</span>'|safe if user.ban_comments }}</span></td>
<td><span title="{{ user.last_seen }}">{{ arrow.get(user.last_seen).humanize(locale=locale) }}</span></td>
<td><span title="{{ _('Reports') }}">{{ user.reports if user.reports > 0 }}</span></td>
<td><span title="{{ _('Attitude') }}">{% if user.attitude != 1 %}{{ (user.attitude * 100) | round | int }}%{% endif %}</span></td>
<td><span title="{{ _('Reputation') }}">{% if user.reputation %}R {{ user.reputation | round | int }}{% endif %}</span></td>
<td><span title="{{ _('Last Seen') }}: {{ user.last_seen }}">{{ arrow.get(user.last_seen).humanize(locale=locale) }}</span></td>
<td><a href="{{ url_for('admin.admin_user_edit', user_id=user.id) }}">Edit</a>,