mirror of https://github.com/logseq/logseq
fix: can't delete remote graph
parent
cf9131afa6
commit
dd63079aa4
|
@ -65,10 +65,9 @@
|
|||
|
||||
[:div.controls
|
||||
[:div.flex.flex-row.items-center
|
||||
(let [current-repo (state/get-current-repo)
|
||||
db-graph? (config/db-based-graph? current-repo)
|
||||
manager? (and db-graph? (user-handler/manager? current-repo))]
|
||||
(when-not (and db-graph? only-cloud? (not manager?))
|
||||
(let [db-graph? (config/db-based-graph? url)
|
||||
manager? (and db-graph? (user-handler/manager? url))]
|
||||
(when-not (and only-cloud? (not manager?))
|
||||
(ui/tippy {:html [:div.text-sm.max-w-xs
|
||||
(cond
|
||||
only-cloud?
|
||||
|
@ -92,7 +91,7 @@
|
|||
"")
|
||||
unlink-or-remote-fn (fn []
|
||||
(repo-handler/remove-repo! repo)
|
||||
(state/pub-event! [:graph/unlinked repo current-repo]))
|
||||
(state/pub-event! [:graph/unlinked repo (state/get-current-repo)]))
|
||||
action-confirm-fn (if only-cloud?
|
||||
(fn []
|
||||
(when (or manager? (not db-graph?))
|
||||
|
|
|
@ -280,9 +280,8 @@
|
|||
|
||||
(defn get-user-type
|
||||
[repo]
|
||||
(when-let [uuid (ldb/get-graph-rtc-uuid (db/get-db repo))]
|
||||
(-> (some #(when (= uuid (:GraphUUID %)) %) (:rtc/graphs @state/state))
|
||||
:graph<->user-user-type)))
|
||||
(-> (some #(when (= repo (:url %)) %) (:rtc/graphs @state/state))
|
||||
:graph<->user-user-type))
|
||||
|
||||
(defn manager?
|
||||
[repo]
|
||||
|
|
Loading…
Reference in New Issue