Бот для капчи в чатах
Roman Sergienko
2026-10-10 c3f15480f581df8799eeead71987956db11e85b9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{% 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 %}