mirror of https://github.com/logseq/logseq
fix: click remote rtc graph should download it
parent
c6b61c11fd
commit
ec3506f8ad
|
@ -50,9 +50,18 @@
|
|||
:let [only-cloud? (and remote? (nil? root))
|
||||
db-based? (config/db-based-graph? url)]]
|
||||
[:div.flex.justify-between.mb-4.items-center {:key (or url GraphUUID)}
|
||||
(normalized-graph-label repo #(if only-cloud?
|
||||
(state/pub-event! [:graph/pull-down-remote-graph repo])
|
||||
(state/pub-event! [:graph/switch url])))
|
||||
(normalized-graph-label repo
|
||||
(fn []
|
||||
(when-not (state/sub :rtc/downloading-graph-uuid)
|
||||
(cond
|
||||
root ; exists locally
|
||||
(state/pub-event! [:graph/switch url])
|
||||
|
||||
(and db-based? remote?)
|
||||
(state/pub-event! [:rtc/download-remote-graph GraphName GraphUUID])
|
||||
|
||||
:else
|
||||
(state/pub-event! [:graph/pull-down-remote-graph repo])))))
|
||||
|
||||
[:div.controls
|
||||
[:div.flex.flex-row.items-center
|
||||
|
@ -107,7 +116,7 @@
|
|||
(if has-prompt?
|
||||
(state/set-modal! (confirm-fn))
|
||||
(unlink-or-remote-fn))))}
|
||||
(if (or db-based? only-cloud?) "Remove" "Unlink")])]]]))
|
||||
(if only-cloud? "Remove (server)" "Unlink (local)")])]]]))
|
||||
|
||||
(rum/defc repos < rum/reactive
|
||||
[]
|
||||
|
|
Loading…
Reference in New Issue