From 34ef51c4c8b98993f71354800fdfd50e83972726 Mon Sep 17 00:00:00 2001 From: wasrusgen Date: Fri, 15 May 2026 23:30:28 +0300 Subject: [PATCH] =?UTF-8?q?ux:=20FAB=20=D0=B2=D0=BC=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=BE=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=C2=AB=D0=9D?= =?UTF-8?q?=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=C2=BB=20=D0=B2=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B5=20=D0=BA?= =?UTF-8?q?=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Убрана широкая кнопка btn-primary над поиском - Добавлен FAB (56×56, position:fixed, bottom-right) — кружок с «+» всегда виден поверх списка при любой прокрутке - .client-list: padding-bottom 84px — последняя карточка не прячется - Пустое состояние: обновлён текст («Нажмите + чтобы завести первого») Co-Authored-By: Claude Sonnet 4.6 --- miniapp/assets/clients.js | 22 +++++++++------------- miniapp/assets/podbor.css | 32 ++++++++++++++++++++++++++++++++ miniapp/index.html | 26 +++++++++++++------------- 3 files changed, 54 insertions(+), 26 deletions(-) diff --git a/miniapp/assets/clients.js b/miniapp/assets/clients.js index 23150e7..f1b585a 100644 --- a/miniapp/assets/clients.js +++ b/miniapp/assets/clients.js @@ -396,18 +396,6 @@ const Clients = (function () { root.innerHTML = ""; root.appendChild(headerEl("Клиенты", null)); - // Большая кнопка «Новый клиент» - const addBtn = el(` -
- -
- `); - addBtn.querySelector("#addClientBtn").addEventListener("click", () => { - haptic && haptic("impact"); - location.hash = "#/clients/new"; - }); - root.appendChild(addBtn); - // Поиск (рендерится сразу, до загрузки) const searchWrap = el(`
@@ -417,6 +405,14 @@ const Clients = (function () { root.appendChild(searchWrap); const searchInput = searchWrap.querySelector(".client-search"); + // FAB «Новый клиент» — плавающая кнопка, всегда видна поверх списка + const fab = el(``); + fab.addEventListener("click", () => { + haptic && haptic("impact"); + location.hash = "#/clients/new"; + }); + root.appendChild(fab); + const loading = el(`
`); root.appendChild(loading); @@ -436,7 +432,7 @@ const Clients = (function () {

Пока нет клиентов.
- Заведите первого — кнопка выше. + Нажмите  чтобы завести первого.

`)); diff --git a/miniapp/assets/podbor.css b/miniapp/assets/podbor.css index 89eb0d4..0cc185f 100644 --- a/miniapp/assets/podbor.css +++ b/miniapp/assets/podbor.css @@ -1799,6 +1799,38 @@ flex-direction: column; gap: 8px; margin-top: 8px; + /* отступ чтобы FAB не перекрывал последний элемент */ + padding-bottom: 84px; +} + +/* ── FAB «Новый клиент» ─────────────────────────────── */ +.clients-fab { + position: fixed; + bottom: calc(24px + env(safe-area-inset-bottom, 0px)); + right: 20px; + width: 56px; + height: 56px; + border-radius: 50%; + background: var(--walnut, #6B4A2B); + color: #fff; + font-size: 30px; + font-weight: 300; + line-height: 1; + border: none; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 4px 20px rgba(107, 74, 43, 0.38); + z-index: 90; + transition: transform 0.14s ease, box-shadow 0.14s ease; + -webkit-tap-highlight-color: transparent; + padding: 0; + user-select: none; +} +.clients-fab:active { + transform: scale(0.9); + box-shadow: 0 2px 10px rgba(107, 74, 43, 0.28); } .client-card { diff --git a/miniapp/index.html b/miniapp/index.html index 6533a0a..bf41334 100644 --- a/miniapp/index.html +++ b/miniapp/index.html @@ -12,14 +12,14 @@ - - + +
- +
- - - - - - - - - - + + + + + + + + + +