{% from "_macros.html" import icon %} {% from "_macros_ui.html" import empty_state %} {% macro msg_text(text, max_len=100) %}{{ (text or '')[:max_len] }}{{ '…' if text and text|length > max_len else '' }}{% endmacro %} {% if top_messages %}
{% for msg in top_messages %} {% endfor %}
# Дата Канал Тип Текст Реакции
{{ loop.index }} {{ msg.date|local_dt }} {{ msg.channel_title or msg.channel_username or msg.channel_id }} {{ msg.media_type or 'text' }} {{ msg_text(msg.text) }} {{ msg.total_reactions }} {% if msg.channel_username %} {{ icon("link") }} {% else %} {{ icon("link") }} {% endif %}
{% for msg in top_messages %}
{{ msg.channel_title or msg.channel_username or msg.channel_id }} {{ msg.total_reactions }} 👍
{{ msg.date|local_dt }} · {{ msg.media_type or 'text' }}

{{ msg_text(msg.text) }}

{% if msg.channel_username %} Открыть {{ icon("link") }} {% else %} Открыть {{ icon("link") }} {% endif %}
{% endfor %}
{% else %} {{ empty_state("Нет данных. Реакции собираются при сборе сообщений.", class="card-body mb-0") }} {% endif %}