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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user