{% extends "base.html" %}
|
{% block title %}Пользователи - Amadeus{% endblock %}
|
{% block header %}Пользователи{% endblock %}
|
{% block content %}
|
|
<section class="rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm">
|
<div class="px-5 py-3 border-b border-gray-200 dark:border-gray-800 font-semibold">Активные наказания</div>
|
<div class="overflow-x-auto">
|
<table class="w-full text-sm">
|
<thead class="bg-gray-50 dark:bg-gray-900/60 text-gray-500 dark:text-gray-400">
|
<tr>
|
<th class="px-5 py-3 text-left font-medium">Пользователь</th>
|
<th class="px-5 py-3 text-left font-medium">Чат</th>
|
<th class="px-5 py-3 text-left font-medium">Тип</th>
|
<th class="px-5 py-3 text-left font-medium">Срок</th>
|
<th class="px-5 py-3 text-left font-medium">Выдан</th>
|
</tr>
|
</thead>
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-800">
|
{% for p in rows %}
|
<tr class="hover:bg-gray-50 dark:hover:bg-gray-800/50">
|
<td class="px-5 py-3">
|
<a class="text-brand-500 hover:underline" href="/users/{{ p.chat_id }}/{{ p.user_id }}">{{ p.user_id }}</a>
|
<div class="text-xs text-gray-500">{{ p.reason or "-" }}</div>
|
</td>
|
<td class="px-5 py-3">{{ names.get(p.chat_id, p.chat_id) }}</td>
|
<td class="px-5 py-3">{{ "мут" if p.kind == "mute" else "бан" }}</td>
|
<td class="px-5 py-3">{{ fmt_dur(p.until) if p.until else "бессрочно" }}</td>
|
<td class="px-5 py-3 text-gray-500">{{ fmt_dt(p.created_at) }}</td>
|
</tr>
|
{% else %}
|
<tr><td colspan="5" class="px-5 py-8 text-center text-gray-500">Активных наказаний нет.</td></tr>
|
{% endfor %}
|
</tbody>
|
</table>
|
</div>
|
</section>
|
|
<section class="rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm">
|
<div class="px-5 py-3 border-b border-gray-200 dark:border-gray-800 font-semibold">Предупреждения</div>
|
<div class="overflow-x-auto">
|
<table class="w-full text-sm">
|
<thead class="bg-gray-50 dark:bg-gray-900/60 text-gray-500 dark:text-gray-400">
|
<tr>
|
<th class="px-5 py-3 text-left font-medium">Пользователь</th>
|
<th class="px-5 py-3 text-left font-medium">Чат</th>
|
<th class="px-5 py-3 text-left font-medium">Причина</th>
|
<th class="px-5 py-3 text-left font-medium">Добавлен</th>
|
</tr>
|
</thead>
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-800">
|
{% for w in warns %}
|
<tr class="hover:bg-gray-50 dark:hover:bg-gray-800/50">
|
<td class="px-5 py-3"><a class="text-brand-500 hover:underline" href="/users/{{ w.chat_id }}/{{ w.user_id }}">{{ w.user_id }}</a></td>
|
<td class="px-5 py-3">{{ names.get(w.chat_id, w.chat_id) }}</td>
|
<td class="px-5 py-3">{{ w.reason or "-" }}</td>
|
<td class="px-5 py-3 text-gray-500">{{ fmt_dt(w.created_at) }}</td>
|
</tr>
|
{% else %}
|
<tr><td colspan="4" class="px-5 py-8 text-center text-gray-500">Предупреждений нет.</td></tr>
|
{% endfor %}
|
</tbody>
|
</table>
|
</div>
|
</section>
|
|
{% endblock %}
|