enhance: hide add bullet when the last block is empty

This commit is contained in:
Tienson Qin
2025-08-21 01:37:52 +08:00
parent 4abb5d7b48
commit 8adafa98ad
2 changed files with 5 additions and 2 deletions

View File

@@ -108,6 +108,10 @@
page? (ldb/page? block)
opacity-class (cond
(and editing? has-children?) "opacity-0"
(and (util/mobile?)
(or (some-> (:block/title (last (ldb/sort-by-order (:block/_parent block)))) string/blank?)
(and (not has-children?) (string/blank? (:block/title block)))))
"opacity-0"
(util/mobile?) "opacity-50"
has-children? "opacity-0"
:else "opacity-50")

View File

@@ -24,8 +24,7 @@
[:div.content-inner
{:ref *ref}
(when scroll-container
(page/page-blocks-cp page {:scroll-container scroll-container
:hide-add-button? true}))]))
(page/page-blocks-cp page {:scroll-container scroll-container}))]))
(rum/defc quick-add <
{:will-mount (fn [state]