fix: show bullets for collapsable property block values

pull/11177/head
Tienson Qin 2024-04-24 17:12:23 +08:00
parent 58cf9f8411
commit edef1ea6e6
3 changed files with 6 additions and 4 deletions

View File

@ -2344,7 +2344,7 @@
(-> block (dissoc :block/children :block/page)))]
(if (and (:property-block? config) (:hide-bullet? config) (string/blank? (:block/content block)))
[:div.opacity-50.text-sm "Empty"]
[:div.opacity-50.text-sm.h-6 "Empty"]
(let [title-collapse-enabled? (:outliner/block-title-collapse-enabled? (state/get-config))]
(when (and (not block-ref-with-title?)
(seq body)

View File

@ -386,7 +386,7 @@
}
.block-main-container {
min-height: 26px;
min-height: 24px;
}
.ls-block {

View File

@ -466,13 +466,15 @@
[:div.text-sm.opacity-70 "loading"]
(let [children (model/sort-by-left
(:block/_parent (db/entity (:db/id parent)))
parent)]
parent)
hide-bullet? (and (= (count children) 1)
(not (editor-handler/collapsable? (:block/uuid (first children)))))]
(if (seq children)
[:div.property-block-container.content.flex.flex-1
(block-cp children {:id (str (:block/uuid parent))
:editor-box editor-box
:property-block? true
:hide-bullet? (= (count children) 1)
:hide-bullet? hide-bullet?
:closed-values? closed-values?})]
(property-empty-value)))))