From 40d1e4fb89e332ff34c0996f56eee012ec0ddb15 Mon Sep 17 00:00:00 2001
From: Roman Sergienko <romasergienko@outlook.com>
Date: Fri, 04 Dec 2026 11:29:08 +0000
Subject: [PATCH] Show and manage disabled RP actions; improve mobile layout
---
web/templates/base.html | 30 +++++++++++++++++++-----------
1 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/web/templates/base.html b/web/templates/base.html
index 72b9dfb..172bc8b 100644
--- a/web/templates/base.html
+++ b/web/templates/base.html
@@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
+ <script src="https://telegram.org/js/telegram-web-app.js"></script>
<title>{% block title %}Amadeus{% endblock %}</title>
<script>
// Применяем сохранённую тему до отрисовки, чтобы не мигало.
@@ -72,6 +73,7 @@
</div>
</div>
<a href="/logout" class="mt-3 block rounded-lg border border-gray-200 px-3 py-1.5 text-center text-sm hover:bg-gray-100 dark:border-gray-700 dark:hover:bg-gray-800">Выйти</a>
+ <div class="mt-2 text-center text-[11px] text-gray-400">Amadeus v{{ version }}</div>
</div>
</aside>
@@ -95,24 +97,30 @@
</div>
</div>
-<!-- Нижняя навигация: только на мобильных -->
-<nav class="fixed inset-x-0 bottom-0 z-30 grid grid-cols-5 border-t border-gray-200 bg-white/95 backdrop-blur dark:border-gray-800 dark:bg-gray-900/95 md:hidden">
+<!-- Нижняя навигация: только на мобильных, со значками -->
+<nav class="fixed inset-x-0 bottom-0 z-30 grid grid-cols-5 border-t border-gray-200 bg-white/95 pb-[env(safe-area-inset-bottom)] backdrop-blur dark:border-gray-800 dark:bg-gray-900/95 md:hidden">
{% set nav = [
- ("dash", "/", "Главная"),
- ("chats", "/chats", "Чаты"),
- ("users", "/users", "Люди"),
- ("captcha", "/captcha", "Капчи"),
- ("log", "/log", "Журнал")
+ ("dash", "/", "Главная", "M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125A1.125 1.125 0 005.625 21H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125a1.125 1.125 0 001.125-1.125V9.75"),
+ ("chats", "/chats", "Чаты", "M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 01-.825-.242m9.345-8.334a2.126 2.126 0 00-.476-.095 48.64 48.64 0 00-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0011.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"),
+ ("users", "/users", "Люди", "M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"),
+ ("captcha", "/captcha", "Капчи", "M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z"),
+ ("log", "/log", "Журнал", "M8.25 6.75h7.5M8.25 12h7.5m-7.5 5.25h4.5M3.75 6.75h.008v.008H3.75V6.75zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zM3.75 12h.008v.008H3.75V12zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm-.375 5.25h.008v.008H3.75v-.008zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z")
] %}
- {% for key, href, label in nav %}
- <a href="{{ href }}" class="flex flex-col items-center justify-center py-2.5 text-[11px] leading-tight
- {% if active == key %}text-brand-600 dark:text-brand-400 font-medium{% else %}text-gray-500 dark:text-gray-400{% endif %}">
- {{ label }}
+ {% for key, href, label, icon in nav %}
+ <a href="{{ href }}" class="flex flex-col items-center justify-center gap-0.5 py-2 text-[10px]
+ {% if active == key %}text-brand-600 dark:text-brand-400{% else %}text-gray-500 dark:text-gray-400{% endif %}">
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8">
+ <path stroke-linecap="round" stroke-linejoin="round" d="{{ icon }}"/>
+ </svg>
+ <span class="{% if active == key %}font-medium{% endif %}">{{ label }}</span>
</a>
{% endfor %}
</nav>
<script>
+ // Авторизация создаётся сервером до отображения панели по подписанным initData.
+ if (window.Telegram && window.Telegram.WebApp) window.Telegram.WebApp.ready();
+
// Переключатель тёмной/светлой темы.
document.getElementById("theme-toggle").addEventListener("click", function () {
const root = document.documentElement;
--
Gitblit v1.9.3