Merge branch 'master' into feat/capacitor-new

This commit is contained in:
charlie
2025-06-16 13:57:44 +08:00
20 changed files with 462 additions and 1423 deletions

View File

@@ -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]