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 @@ - - + +
- +
- - - - - - - - - - + + + + + + + + + +