mirror of https://github.com/logseq/logseq
Merge branch 'master' of github.com:logseq/logseq into master
commit
7de090a0ec
|
@ -1208,7 +1208,8 @@
|
||||||
(reset! parents-atom parents)
|
(reset! parents-atom parents)
|
||||||
(when (seq parents)
|
(when (seq parents)
|
||||||
(interpose [:span.mx-2.opacity-50 "➤"]
|
(interpose [:span.mx-2.opacity-50 "➤"]
|
||||||
parents))))]]
|
parents))))]
|
||||||
|
component (filterv identity component)]
|
||||||
(when (or (seq @parents-atom) show-page?)
|
(when (or (seq @parents-atom) show-page?)
|
||||||
component))))))
|
component))))))
|
||||||
|
|
||||||
|
|
|
@ -67,10 +67,15 @@
|
||||||
(content/content page-name
|
(content/content page-name
|
||||||
{:hiccup ref-hiccup}))])]]))))
|
{:hiccup ref-hiccup}))])]]))))
|
||||||
|
|
||||||
(rum/defc unlinked-references-aux < rum/reactive db-mixins/query
|
(rum/defcs unlinked-references-aux
|
||||||
[page-name n-ref]
|
< rum/reactive db-mixins/query
|
||||||
(let [ref-blocks (db/get-page-unlinked-references page-name)]
|
{:will-mount (fn [state]
|
||||||
(reset! n-ref (count ref-blocks))
|
(let [[page-name n-ref] (:rum/args state)
|
||||||
|
ref-blocks (db/get-page-unlinked-references page-name)]
|
||||||
|
(reset! n-ref (count ref-blocks))
|
||||||
|
(assoc state ::ref-blocks ref-blocks)))}
|
||||||
|
[state page-name n-ref]
|
||||||
|
(let [ref-blocks (::ref-blocks state)]
|
||||||
[:div.references-blocks
|
[:div.references-blocks
|
||||||
(let [ref-hiccup (block/->hiccup ref-blocks
|
(let [ref-hiccup (block/->hiccup ref-blocks
|
||||||
{:id (str page-name "-unlinked-")
|
{:id (str page-name "-unlinked-")
|
||||||
|
@ -95,6 +100,5 @@
|
||||||
(if @n-ref
|
(if @n-ref
|
||||||
(str @n-ref " Unlinked References")
|
(str @n-ref " Unlinked References")
|
||||||
"Unlinked References")]
|
"Unlinked References")]
|
||||||
(fn []
|
(fn [] (unlinked-references-aux page-name n-ref))
|
||||||
(unlinked-references-aux page-name n-ref))
|
|
||||||
true)]]))))
|
true)]]))))
|
||||||
|
|
|
@ -352,11 +352,11 @@
|
||||||
[:a#download.hidden]
|
[:a#download.hidden]
|
||||||
(when (and (not config/mobile?)
|
(when (and (not config/mobile?)
|
||||||
(not config/publishing?))
|
(not config/publishing?))
|
||||||
[(help-button)
|
(help-button)
|
||||||
;; [:div.font-bold.absolute.bottom-4.bg-base-2.rounded-full.h-8.w-8.flex.items-center.justify-center.font-bold.cursor.opacity-70.hover:opacity-100
|
;; [:div.font-bold.absolute.bottom-4.bg-base-2.rounded-full.h-8.w-8.flex.items-center.justify-center.font-bold.cursor.opacity-70.hover:opacity-100
|
||||||
;; {:style {:left 24}
|
;; {:style {:left 24}
|
||||||
;; :title "Click to show/hide sidebar"
|
;; :title "Click to show/hide sidebar"
|
||||||
;; :on-click (fn []
|
;; :on-click (fn []
|
||||||
;; (state/set-left-sidebar-open! (not (state/get-left-sidebar-open?))))}
|
;; (state/set-left-sidebar-open! (not (state/get-left-sidebar-open?))))}
|
||||||
;; (if (state/sub :ui/left-sidebar-open?) "<" ">")]
|
;; (if (state/sub :ui/left-sidebar-open?) "<" ">")]
|
||||||
])])))
|
)])))
|
||||||
|
|
|
@ -472,8 +472,14 @@
|
||||||
[:div {:class (if @collapsed?
|
[:div {:class (if @collapsed?
|
||||||
"hidden"
|
"hidden"
|
||||||
"initial")}
|
"initial")}
|
||||||
(if (and (fn? content) (not @collapsed?))
|
(cond
|
||||||
|
(and (fn? content) (not @collapsed?))
|
||||||
(content)
|
(content)
|
||||||
|
|
||||||
|
(fn? content)
|
||||||
|
nil
|
||||||
|
|
||||||
|
:else
|
||||||
content)]]))
|
content)]]))
|
||||||
|
|
||||||
(defn admonition
|
(defn admonition
|
||||||
|
|
Loading…
Reference in New Issue