{# Search results fragment (#946): rendered by GET /search/fragments/results and swapped into the #search-results container on the lazyloaded search page. #} {% from "_macros.html" import icon %} {% if result %} {% if result.error %}
Ошибка: {{ result.error }}
{% endif %} {% if result.ai_summary %}
AI-анализ

{{ result.ai_summary }}

{% endif %} {% if not result.error %} {% if browse_mode and selected_channel %}

Сообщения из канала {{ selected_channel.title or selected_channel.username or selected_channel.channel_id }}: {{ result.total }}{% if result.has_more %}+{% endif %}

{% else %}

Найдено: {{ result.total }}{% if result.has_more %}+{% endif %} сообщений по запросу «{{ result.query }}»

{% endif %} {% endif %} {% if result.messages %}
{% for msg in result.messages %} {% endfor %}
Дата Канал Отправитель Медиа Текст Охват
{{ msg.date|local_dt }} {{ msg.channel_title or msg.channel_username or msg.channel_id }} {{ msg.sender_name or "—" }} {{ msg.media_type or "—" }} {% if msg.detected_lang %}{{ msg.detected_lang }}{% endif %} {{ msg.text[:300] if msg.text else "—" }}{{ "..." if msg.text and msg.text|length > 300 else "" }} {% if msg.translation_en %}
{{ msg.translation_en[:300] }}{{ "..." if msg.translation_en|length > 300 else "" }}
{% elif msg.id is not none and msg.text and msg.detected_lang and msg.detected_lang != 'en' %} {% endif %}
{%- if msg.views is not none %}👁 {{ msg.views }}{% endif %} {%- if msg.forwards is not none %} ↗ {{ msg.forwards }}{% endif %} {%- if msg.reply_count is not none %} {{ icon("comments") }} {{ msg.reply_count }}{% endif %} {%- if msg.views is none and msg.forwards is none and msg.reply_count is none %}—{% endif %} {% if msg.channel_username %}{{ icon("link") }}{% else %}{{ icon("link") }}{% endif %}
{% for msg in result.messages %}
{{ msg.channel_title or msg.channel_username or msg.channel_id }} {% if msg.channel_username %}{{ icon("link") }}{% else %}{{ icon("link") }}{% endif %}
{{ msg.date|local_dt }}{% if msg.sender_name %} · {{ msg.sender_name }}{% endif %}{% if msg.media_type %} · {{ msg.media_type }}{% endif %}

{% if msg.detected_lang %}{{ msg.detected_lang }}{% endif %} {{ msg.text[:200] if msg.text else "—" }}{{ "..." if msg.text and msg.text|length > 200 else "" }} {% if msg.translation_en %} {{ msg.translation_en[:200] }}{{ "..." if msg.translation_en|length > 200 else "" }} {% elif msg.id is not none and msg.text and msg.detected_lang and msg.detected_lang != 'en' %} {% endif %}

{%- if msg.views is not none or msg.forwards is not none or msg.reply_count is not none %} {%- if msg.views is not none %}👁 {{ msg.views }}{% endif %} {%- if msg.forwards is not none %} ↗ {{ msg.forwards }}{% endif %} {%- if msg.reply_count is not none %} {{ icon("comments") }} {{ msg.reply_count }}{% endif %} {%- endif %}
{% endfor %}
{% if page > 1 or has_more %} {% endif %} {% else %}

Ничего не найдено.

{% endif %} {% endif %}