Бот для капчи в чатах
Roman Sergienko
2026-10-10 deb3fdc92021eea33dfb2050910124fa6ae4adc1
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
{% extends "base.html" %}
{% block title %}Чаты - Amadeus{% endblock %}
{% block header %}Чаты{% endblock %}
{% block content %}
 
<div class="overflow-hidden rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm">
    <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-right font-medium"></th>
            </tr>
        </thead>
        <tbody class="divide-y divide-gray-100 dark:divide-gray-800">
            {% for c in chats %}
            {% set cfg = cfgs.get(c.chat_id) %}
            <tr class="hover:bg-gray-50 dark:hover:bg-gray-800/50">
                <td class="px-5 py-3">
                    <div class="font-medium">{{ c.title or c.chat_id }}</div>
                    <div class="text-xs text-gray-500">id {{ c.chat_id }} · {{ c.type }}</div>
                </td>
                <td class="px-5 py-3 text-gray-500">{{ cfg.btn_count }} кнопки · {{ cfg.timeout }} с · {{ cfg.max_attempts }} попытки</td>
                <td class="px-5 py-3 text-gray-500">{{ cfg.warn_limit }} · {{ "бан" if cfg.warn_action == "ban" else "мут" }}</td>
                <td class="px-5 py-3 text-right">
                    <a href="/chats/{{ c.chat_id }}" class="rounded-lg border border-gray-200 dark:border-gray-700 px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-800">Открыть</a>
                </td>
            </tr>
            {% else %}
            <tr><td colspan="4" class="px-5 py-8 text-center text-gray-500">Нет доступных чатов.</td></tr>
            {% endfor %}
        </tbody>
    </table>
</div>
 
{% endblock %}