{% extends "base.html" %} {% from "_macros.html" import icon, filter_flags, channel_actions %} {% from "_macros_ui.html" import status_dot %} {% block title %}Каналы — TG Agent{% endblock %} {% block content %}

Каналы

Добавить канал
Форматы: @username, t.me/username, https://t.me/username, https://t.me/+invite_hash, числовой ID
Импорт
{% if channels or show_all %}
Активные Все каналы
{% for ch in channels %} {% set st = latest_stats.get(ch.channel_id) if latest_stats else None %} {% endfor %}
ID канала Название Username Описание Тип Статус Сообщений Подписчики Просмотры Реакции Репосты Фильтр Действия
{{ ch.channel_id }} {{ ch.title or "—" }} {% if ch.username %}@{{ ch.username }}{% else %}—{% endif %} {% if ch.about %}{{ ch.about[:60] }}{% if ch.about|length > 60 %}…{% endif %}{% else %}—{% endif %} {% if ch.channel_type == "channel" %}{% if not ch.username %}Канал {{ icon("private") }}{% else %}Канал{% endif %}{% elif ch.channel_type == "supergroup" %}{% if not ch.username %}Супергруппа {{ icon("private") }}{% else %}Супергруппа{% endif %}{% elif ch.channel_type == "gigagroup" %}{% if not ch.username %}Гигагруппа {{ icon("private") }}{% else %}Гигагруппа{% endif %}{% elif ch.channel_type == "group" %}{% if not ch.username %}Группа {{ icon("private") }}{% else %}Группа{% endif %}{% elif ch.channel_type == "forum" %}{% if not ch.username %}Форум {{ icon("private") }}{% else %}Форум{% endif %}{% elif ch.channel_type == "monoforum" %}Монофорум{% elif ch.channel_type == "restricted" %}Ограничен{% elif ch.channel_type == "scam" %}Скам {{ icon("warning") }}{% elif ch.channel_type == "fake" %}Фейк {{ icon("warning") }}{% elif ch.channel_type == "unavailable" %}Недоступен{% else %}Непроверен{% endif %}{% if ch.has_comments %} {{ icon("comments") }}{% endif %} {{ status_dot(ch) }} {{ ch.message_count }} {%- set sub = st.subscriber_count if st and st.subscriber_count is not none else none -%} {%- set prev_sub = prev_subscriber_counts.get(ch.channel_id) if prev_subscriber_counts else none -%} {%- if sub is not none -%} {{ sub }} {%- if prev_sub is not none -%} {%- if sub > prev_sub -%} {{ icon("trend_up") }} {%- elif sub < prev_sub -%} {{ icon("trend_down") }} {%- else -%} {{ icon("trend_flat") }} {%- endif -%} {%- endif -%} {%- else -%}—{%- endif -%} {{ "%.0f"|format(st.avg_views) if st and st.avg_views is not none else "—" }} {{ "%.0f"|format(st.avg_reactions) if st and st.avg_reactions is not none else "—" }} {{ "%.0f"|format(st.avg_forwards) if st and st.avg_forwards is not none else "—" }} {% if ch.is_filtered %} {{ filter_flags(ch.filter_flags) }} {% else %} — {% endif %} {{ channel_actions(ch) }}
{% for ch in channels %} {% set st = latest_stats.get(ch.channel_id) if latest_stats else None %}
{{ status_dot(ch) }} {{ ch.title or "—" }} {% if ch.has_comments %}{{ icon("comments") }}{% endif %}
{% if ch.about %}{{ ch.about[:60] }}{% if ch.about|length > 60 %}…{% endif %}{% endif %} {% if ch.username %}@{{ ch.username }} · {% endif %} ID: {{ ch.channel_id }} · {{ ch.message_count }} сообщ. {%- if st -%} {%- if st.subscriber_count is not none %} · {{ st.subscriber_count }} {%- set prev_sub = prev_subscriber_counts.get(ch.channel_id) if prev_subscriber_counts else none -%} {%- if prev_sub is not none -%} {%- if st.subscriber_count > prev_sub %}{{ icon("trend_up") }} {%- elif st.subscriber_count < prev_sub %}{{ icon("trend_down") }} {%- else %}{{ icon("trend_flat") }} {%- endif -%} {%- endif %} подп. {%- endif -%} {%- if st.avg_views is not none %} · {{ icon("view") }} {{ "%.0f"|format(st.avg_views) }}{%- endif -%} {%- if st.avg_reactions is not none %} · ❤️ {{ "%.0f"|format(st.avg_reactions) }}{%- endif -%} {%- if st.avg_forwards is not none %} · ↪ {{ "%.0f"|format(st.avg_forwards) }}{%- endif -%} {%- endif -%}
{{ channel_actions(ch, prefix="m-") }}
{% endfor %}
{% else %}

Нет добавленных каналов.

{% endif %} {% endblock %}