fix: don't show mod+enter to inline #Page

This commit is contained in:
Tienson Qin
2025-08-27 10:32:50 +08:00
parent 876d5dba5a
commit 8f1d01daad
2 changed files with 5 additions and 2 deletions

View File

@@ -254,7 +254,9 @@
"Search for a node")]
:class "black"})
(when (and db-based? db-tag? (not (string/blank? q)))
(when (and db-based? db-tag?
(not (string/blank? q))
(not= "page" (string/lower-case q)))
[:p.px-1.opacity-50.text-sm
[:code (if util/mac? "Cmd+Enter" "Ctrl+Enter")]
[:span " to display this tag inline instead of at the end of this node."]])])))

View File

@@ -226,7 +226,8 @@
class? (and db-based?
(or (string/includes? chosen (str (t :new-tag) " "))
(ldb/class? chosen-result)))
inline-tag? (and class? (= (.-identifier e) "auto-complete/meta-complete"))
inline-tag? (and class? (= (.-identifier e) "auto-complete/meta-complete")
(not= chosen "Page"))
chosen (-> chosen
(string/replace-first (str (t :new-tag) " ") "")
(string/replace-first (str (t :new-page) " ") ""))