mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 16:36:27 +00:00
Merge branch 'master' into feat/capacitor-new
This commit is contained in:
@@ -84,11 +84,21 @@
|
||||
(when (and (not (string/blank? q))
|
||||
(not (#{"config.edn" "custom.js" "custom.css"} q))
|
||||
(not config/publishing?))
|
||||
(let [class? (string/starts-with? q "#")]
|
||||
(->> [{:text (if class? "Create tag" "Create page") :icon "new-page"
|
||||
(let [class? (string/starts-with? q "#")
|
||||
class-name (get-class-from-input q)
|
||||
class (ldb/class? (db/get-case-page class-name))]
|
||||
(->> [{:text (cond
|
||||
class "Configure tag"
|
||||
class? "Create tag"
|
||||
:else "Create page")
|
||||
:icon "new-page"
|
||||
:icon-theme :gray
|
||||
:info (if class?
|
||||
(str "Create class called '" (get-class-from-input q) "'")
|
||||
(let [class-name (get-class-from-input q)
|
||||
class (db/get-case-page class-name)]
|
||||
(if class
|
||||
(str "Configure #" class-name)
|
||||
(str "Create tag called '" class-name "'")))
|
||||
(str "Create page called '" q "'"))
|
||||
:source-create :page}]
|
||||
(remove nil?)))))
|
||||
@@ -554,7 +564,7 @@
|
||||
create-page? (page-handler/<create! @!input {:redirect? true}))]
|
||||
(shui/dialog-close! :ls-dialog-cmdk)
|
||||
(when (and create-class? result)
|
||||
(state/sidebar-add-block! (state/get-current-repo) (:db/id result) :block)))))
|
||||
(state/pub-event! [:dialog/show-block result {:tag-dialog? true}])))))
|
||||
|
||||
(defn- get-filter-user-input
|
||||
[input]
|
||||
|
||||
Reference in New Issue
Block a user