mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 14:14:55 +00:00
fix: disable nonsensical things for publishing
Disable graph creation and more ways to alter blocks in publishing
This commit is contained in:
@@ -2814,7 +2814,7 @@
|
||||
:on-click #(db-property-handler/delete-property-value! (:db/id block) :block/tags (:db/id tag))}
|
||||
"Remove tag"))])
|
||||
popup-opts))}
|
||||
(if (and @*hover? (not private-tag?))
|
||||
(if (and @*hover? (not private-tag?) (not config/publishing?))
|
||||
[:a.inline-flex.text-muted-foreground
|
||||
{:title "Remove this tag"
|
||||
:style {:margin-top 1
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
[frontend.components.page :as page]
|
||||
[frontend.components.profiler :as profiler]
|
||||
[frontend.components.shortcut-help :as shortcut-help]
|
||||
[frontend.config :as config]
|
||||
[frontend.context.i18n :refer [t]]
|
||||
[frontend.date :as date]
|
||||
[frontend.db :as db]
|
||||
@@ -437,7 +438,7 @@
|
||||
(state/sidebar-add-block! repo "help" :help))}
|
||||
(t :right-side-bar/help)]]
|
||||
|
||||
(when (state/sub [:ui/developer-mode?])
|
||||
(when (and (state/sub [:ui/developer-mode?]) (not config/publishing?))
|
||||
[:div.text-sm
|
||||
[:button.button.cp__right-sidebar-settings-btn {:on-click (fn [_e]
|
||||
(state/sidebar-add-block! repo "rtc" :rtc))}
|
||||
|
||||
@@ -462,9 +462,11 @@
|
||||
:binding []}
|
||||
|
||||
:graph/add {:fn (fn [] (route-handler/redirect! {:to :graphs}))
|
||||
:inactive config/publishing?
|
||||
:binding []}
|
||||
|
||||
:graph/db-add {:fn #(state/pub-event! [:graph/new-db-graph])
|
||||
:inactive config/publishing?
|
||||
:binding false}
|
||||
|
||||
:graph/db-save {:fn #(state/pub-event! [:graph/save-db-to-disk])
|
||||
@@ -541,6 +543,7 @@
|
||||
|
||||
:editor/quick-add {:binding (if mac? "mod+e" "mod+alt+e")
|
||||
:db-graph? true
|
||||
:inactive config/publishing?
|
||||
:fn editor-handler/quick-add}
|
||||
:editor/jump {:binding "mod+j"
|
||||
:fn jump-handler/jump-to}
|
||||
|
||||
Reference in New Issue
Block a user