From 3743db98b6aeb911d2a39b7819109f053e6bc541 Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Fri, 24 Jul 2026 15:49:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D0=B0=20=D0=B4=D0=B8=D0=B0=D0=BB=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=D0=B2=20(=D1=81=D1=82=D0=B8=D0=BB=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/style.css | 6 +++ templates/dialogs.twig | 99 ++++++++++++++++++++---------------------- 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index eb3bfa7..91c7218 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -310,6 +310,12 @@ a { letter-spacing: -0.01em; } +.page-head h1 .pill { + vertical-align: middle; + font-size: 0.55em; + margin-left: 4px; +} + .page-subtitle { margin: 0; color: var(--color-text-muted); diff --git a/templates/dialogs.twig b/templates/dialogs.twig index 7d58f99..e12ebb3 100644 --- a/templates/dialogs.twig +++ b/templates/dialogs.twig @@ -5,67 +5,60 @@
{{ icons.chat() }}
-

Диалоги

+

Диалоги {% if dialogs is not empty %}{{ dialogs|length }}{% endif %}

Личные сообщения с другими пользователями

{% if isAuthorized %} -
-
-

{{ icons.chat() }} Мои диалоги

- {% if dialogs is not empty %}{{ dialogs|length }} шт.{% endif %} + {% if dialogs is empty %} +
+ {{ icons.chat() }} + Диалогов пока нет
- - {% if dialogs is empty %} -
- {{ icons.chat() }} - Диалогов пока нет -
- {% else %} -
- {% for dialog in dialogs %} - - - - {% if dialog.companionAvatar %} - {{ dialog.companionData.name }} - {% else %} - {{ (dialog.companionData.name|default(dialog.companionData.login))|slice(0, 1)|upper }} - {% endif %} - - + {% else %} +
+ {% for dialog in dialogs %} + + + + {% if dialog.companionAvatar %} + {{ dialog.companionData.name }} + {% else %} + {{ (dialog.companionData.name|default(dialog.companionData.login))|slice(0, 1)|upper }} + {% endif %} - +
+ {% if dialog.lastMessage %} + {% if dialog.lastMessage.user_from == userId %}Вы:{% endif %} + {% if dialog.lastMessage.type == 'text' %} + {{ dialog.lastMessage.text|slice(0, 80) }}{% if dialog.lastMessage.text|length > 80 %}…{% endif %} + {% elseif dialog.lastMessage.type == 'image' %} + {{ icons.paperclip() }} Изображение + {% elseif dialog.lastMessage.type == 'file' %} + {{ icons.paperclip() }} Файл + {% endif %} + {% else %} + Сообщений пока нет + {% endif %} +
+
+ {% if dialog.unviewedCount > 0 %} + {{ dialog.unviewedCount }} + {% endif %} + + {% endfor %} +
+ {% endif %} {% else %}
{{ icons.warning() }}Вы не авторизованы
{% endif %}