|
|
@@ -42,7 +42,6 @@
|
|
|
[frontend.util :as util]
|
|
|
[frontend.util.text :as text-util]
|
|
|
[goog.object :as gobj]
|
|
|
- [logseq.common.config :as common-config]
|
|
|
[logseq.common.util :as common-util]
|
|
|
[logseq.common.util.page-ref :as page-ref]
|
|
|
[logseq.db :as ldb]
|
|
|
@@ -113,8 +112,7 @@
|
|
|
has-children? "opacity-0"
|
|
|
:else "opacity-50")
|
|
|
config (dissoc config* :page)]
|
|
|
- (when (and (or page? (util/mobile?))
|
|
|
- (not= (:block/title block) common-config/quick-add-page-name))
|
|
|
+ (when (or page? (util/mobile?))
|
|
|
[:div.ls-block.block-add-button.flex-1.flex-col.rounded-sm.cursor-text.transition-opacity.ease-in.duration-100.!py-0
|
|
|
{:class opacity-class
|
|
|
:parentblockid (:db/id block)
|
|
|
@@ -168,7 +166,7 @@
|
|
|
(date/journal-title->int (date/today))))
|
|
|
(state/pub-event! [:journal/insert-template page-name]))))
|
|
|
state)}
|
|
|
- [state block* {:keys [sidebar? whiteboard?] :as config}]
|
|
|
+ [state block* {:keys [sidebar? whiteboard? hide-add-button?] :as config}]
|
|
|
(when-let [id (:db/id block*)]
|
|
|
(let [block (db/sub-block id)
|
|
|
block-id (:block/uuid block)
|
|
|
@@ -204,7 +202,8 @@
|
|
|
blocks (if block? [block] (db/sort-by-order children block))]
|
|
|
[:div.relative
|
|
|
(page-blocks-inner block blocks config sidebar? whiteboard? block-id)
|
|
|
- (add-button block config)])))))
|
|
|
+ (when-not hide-add-button?
|
|
|
+ (add-button block config))])))))
|
|
|
|
|
|
(rum/defc today-queries < rum/reactive
|
|
|
[repo today? sidebar?]
|