From dee1d776c3e286c80ef5fbbb3142a9f9abc47987 Mon Sep 17 00:00:00 2001 From: Nikolay Tatarinov Date: Thu, 19 Feb 2026 16:27:20 +0300 Subject: [PATCH] style: update padding for body and add early return in day detail function - Adjusted the bottom padding in `style.css` to improve layout by incorporating a comfortable offset for safe areas. - Added an early return in `dayDetail.js` to prevent further processing when there are no duties or event summaries, enhancing performance and preventing unnecessary DOM manipulations. --- webapp/js/dayDetail.js | 2 ++ webapp/style.css | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/js/dayDetail.js b/webapp/js/dayDetail.js index 138a509..62ce691 100644 --- a/webapp/js/dayDetail.js +++ b/webapp/js/dayDetail.js @@ -221,6 +221,8 @@ function openDayDetail(cell) { const duties = /** @type {object[]} */ (parseDataAttr(dutiesRaw || "")); const eventSummaries = /** @type {string[]} */ (parseDataAttr(eventsRaw || "")); + if (duties.length === 0 && eventSummaries.length === 0) return; + ensurePanelInDom(); if (!panelEl) return; diff --git a/webapp/style.css b/webapp/style.css index 52051b0..a4756a3 100644 --- a/webapp/style.css +++ b/webapp/style.css @@ -246,7 +246,8 @@ body { padding-top: 12px; padding-left: 16px; padding-right: 16px; - padding-bottom: max(16px, env(safe-area-inset-bottom)); + /* Комфортный отступ снизу: safe area + дополнительное поле */ + padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); } .day-detail-panel--sheet::before {