From e601e66d355ea2fa8e0bb8a59b44119d6b42f735 Mon Sep 17 00:00:00 2001 From: Professional Date: Fri, 23 May 2025 20:28:18 +0700 Subject: [PATCH] =?UTF-8?q?=D0=B1=D0=B0=D0=B3=D1=84=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 57 ++++++------------------------------------ src/views/ChatView.vue | 15 ++++++----- 2 files changed, 17 insertions(+), 55 deletions(-) diff --git a/src/App.vue b/src/App.vue index c6dd106..28f33e6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -232,6 +232,7 @@ body { background: white; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); z-index: 1000; + padding-bottom: env(safe-area-inset-bottom, 0px); /* Используем env напрямую для поддержки iOS */ } .nav-item { @@ -245,66 +246,24 @@ body { transition: all 0.2s ease; padding: 4px 0; position: relative; -} - -.nav-icon { - position: relative; - display: flex; - align-items: center; - justify-content: center; - margin-bottom: 3px; - height: 28px; -} - -.nav-item i { - font-size: 1.5rem; - transition: transform 0.2s ease; -} - -.nav-item span { - font-size: 0.7rem; - font-weight: 500; -} - -.nav-item.active { - color: #667eea; -} - -.nav-item.active i { - transform: scale(1.15); -} - -/* Индикатор непрочитанных сообщений */ -.unread-badge { - position: absolute; - top: -5px; - right: -8px; - background-color: #ff6b6b; - color: white; - font-size: 0.6rem; - border-radius: 50%; - min-width: 16px; - height: 16px; - display: flex; - align-items: center; - justify-content: center; - font-weight: 600; - box-shadow: 0 2px 5px rgba(255, 107, 107, 0.3); - border: 1px solid white; + /* Не растягиваем сами иконки/текст, а только добавляем нижний отступ */ + padding-bottom: calc(env(safe-area-inset-bottom, 0px) / 3); } /* CSS переменные для динамической настройки */ :root { --nav-height: 60px; --header-height: 56px; - --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px); } /* Учет Safe Area на устройствах с вырезами (iPhone X и новее) */ @supports (padding-bottom: env(safe-area-inset-bottom)) { .mobile-nav { - height: calc(var(--nav-height) + var(--safe-area-inset-bottom)); - padding-bottom: var(--safe-area-inset-bottom); + height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px)); + } + + .app-content { + height: calc(100% - var(--nav-height) - env(safe-area-inset-bottom, 0px)); } } diff --git a/src/views/ChatView.vue b/src/views/ChatView.vue index 729e635..7540db2 100644 --- a/src/views/ChatView.vue +++ b/src/views/ChatView.vue @@ -698,9 +698,11 @@ const handleClickOutsideContextMenu = (event) => { border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding: 0.8rem 1rem; color: white; - position: sticky; + position: fixed; /* Меняем со sticky на fixed */ top: 0; - z-index: 10; + left: 0; + right: 0; + z-index: 100; /* Увеличиваем z-index для правильного отображения */ flex-shrink: 0; height: var(--header-height, 56px); } @@ -815,7 +817,8 @@ const handleClickOutsideContextMenu = (event) => { position: relative; display: flex; flex-direction: column; - padding-bottom: calc(70px + var(--nav-height, 60px)); /* Добавляем отступ внизу для поля ввода и навигационной панели */ + padding-top: var(--header-height, 56px); /* Добавляем отступ сверху для фиксированного хедера */ + padding-bottom: calc(70px + var(--nav-height, 60px)); /* Отступ снизу для блока ввода и навигационной панели */ } /* Состояния загрузки и ошибки */ @@ -1066,11 +1069,11 @@ const handleClickOutsideContextMenu = (event) => { background: white; border-top: 1px solid rgba(0, 0, 0, 0.1); padding: 0.8rem 1rem; - position: fixed; /* Меняем со sticky на fixed для надежной фиксации */ - bottom: 0; + position: fixed; + bottom: var(--nav-height, 60px); /* Размещаем прямо над навигационными табами */ left: 0; right: 0; - z-index: 100; /* Увеличиваем z-index, чтобы блок был над всеми элементами */ + z-index: 100; max-width: 800px; margin: 0 auto; width: 100%;