From c91c0d6e1c7533af46921c38bf589b9f62258699 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Sun, 28 Sep 2025 20:09:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=D1=8B=D1=81=D0=BE=D1=82=D1=8B=20=D0=B1?= =?UTF-8?q?=D0=BB=D0=BE=D0=BA=D0=BE=D0=B2=20=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=D0=BA=D0=B8=20=D0=B8=20=D1=81=D0=B2=D1=8F=D0=B7=D0=B0?= =?UTF-8?q?=D0=BD=D0=BD=D1=8B=D1=85=20=D1=81=D0=BE=D0=B1=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D0=B9,=20=D0=B4=D0=B5=D0=BA=D0=BE=D0=B4=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=BA=D0=B0=20=D0=BF=D1=80=D0=B5=D0=B4=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=82=D0=B5=D0=BA=D1=81?= =?UTF-8?q?=D1=82=D0=B0=20=D0=BE=D0=BF=D1=80=D0=BE=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/index.html | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/templates/index.html b/templates/index.html index cb9afdd..bc2b34d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1651,6 +1651,13 @@ minute: '2-digit' }); }; + // Декодируем Unicode строки + const decodeUnicode = (str) => { + if (!str) return str; + return str.replace(/\\u[\dA-F]{4}/gi, (match) => { + return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)); + }); + }; // Загружаем связанные события const linkedEvents = await fetch(`${PREFIX}/api/posts/${postId}/linked_events`) .then(response => response.json()) @@ -1719,22 +1726,22 @@ Информация об опросе
-
- -
${post.poll_question || 'Не указан'}
+
+ +
${post.poll_question || 'Не указан'}
-
- -
${post.poll_options || 'Не указаны'}
+
+ +
${decodeUnicode(post.poll_options) || 'Не указаны'}
- -
${post.poll_multiple ? 'Да' : 'Нет'}
+ +
${post.poll_multiple ? 'Да' : 'Нет'}
- -
${formatDate(post.poll_end_date)}
+ +
${formatDate(post.poll_end_date)}
@@ -1744,8 +1751,8 @@
Результаты опроса в Telegram
-
-
${post.tg_poll_results}
+
+
${post.tg_poll_results}
` : ''} ${post.marks && post.marks.length > 0 ? ` @@ -1753,9 +1760,9 @@
Подписки (${post.marks.length})
-
+
- +
@@ -1783,11 +1790,11 @@
Связанные события (${linkedEvents.length})
-
+
-
+
${linkedEvents.map(event => ` - ${event.name || `Событие ${event.id}`}
Имя пользователя