mirror of https://github.com/logseq/logseq
parent
aa38e83fa4
commit
220a55b756
|
@ -2091,14 +2091,18 @@
|
|||
(not (:slide? config)))
|
||||
(properties-cp config block))
|
||||
|
||||
(when (and (not block-ref-with-title?) (seq body))
|
||||
[:div.block-body {:style {:display (if (and collapsed? (seq title)) "none" "")}}
|
||||
;; TODO: consistent id instead of the idx (since it could be changed later)
|
||||
(let [body (block/trim-break-lines! (:block/body block))]
|
||||
(for [[idx child] (medley/indexed body)]
|
||||
(when-let [block (markup-element-cp config child)]
|
||||
(rum/with-key (block-child block)
|
||||
(str uuid "-" idx)))))])
|
||||
(let [title-collapse-enabled? (:outliner/block-title-collapse-enabled? (state/get-config))]
|
||||
(when (and (not block-ref-with-title?)
|
||||
(seq body)
|
||||
(or (not title-collapse-enabled?)
|
||||
(and title-collapse-enabled? (not collapsed?))))
|
||||
[:div.block-body
|
||||
;; TODO: consistent id instead of the idx (since it could be changed later)
|
||||
(let [body (block/trim-break-lines! (:block/body block))]
|
||||
(for [[idx child] (medley/indexed body)]
|
||||
(when-let [block (markup-element-cp config child)]
|
||||
(rum/with-key (block-child block)
|
||||
(str uuid "-" idx)))))]))
|
||||
|
||||
(case (:block/warning block)
|
||||
:multiple-blocks
|
||||
|
|
|
@ -2916,9 +2916,9 @@
|
|||
|
||||
:else
|
||||
nil)))
|
||||
|
||||
|
||||
(close-autocomplete-if-outside input)
|
||||
|
||||
|
||||
(when-not (or (= k "Shift") is-processed?)
|
||||
(state/set-last-key-code! {:key-code key-code
|
||||
:code code
|
||||
|
|
Loading…
Reference in New Issue