fix: search namespace pages

This commit is contained in:
Tienson Qin
2025-05-18 03:19:46 +08:00
parent 6c12676a08
commit 334b5be62e
5 changed files with 37 additions and 26 deletions

View File

@@ -49,15 +49,6 @@
(medley/find-first #(= name (:name (second %1)))
(medley/indexed alias-dirs))))
(defn- convert-platform-protocol
[full-path]
(cond-> full-path
(and (string? full-path)
(mobile-util/native-platform?))
(string/replace-first
#"^(file://|assets://)" common-config/capacitor-protocol-with-prefix)))
(defn resolve-asset-real-path-url
[repo rpath]
(when-let [rpath (and (string? rpath)
@@ -86,7 +77,7 @@
(if has-schema?
(path/path-join graph-root rpath)
(path/prepend-protocol "file:" (path/path-join graph-root rpath)))))]
(convert-platform-protocol ret)))))
ret))))
(defn normalize-asset-resource-url
"try to convert resource file to url asset link"

View File

@@ -225,7 +225,7 @@ DROP TRIGGER IF EXISTS blocks_au;
;; (let [content (if (and db-based? (seq (:block/properties block)))
;; (str content (when (not= content "") "\n") (get-db-properties-str db properties))
;; content)])
(let [title (ldb/get-class-title-with-extends (assoc block :block.temp/search? true))]
(let [title (ldb/get-title-with-parents (assoc block :block.temp/search? true))]
(when uuid
{:id (str uuid)
:page (str (or (:block/uuid page) uuid))
@@ -319,7 +319,7 @@ DROP TRIGGER IF EXISTS blocks_au;
{:db/id (:db/id block)
:block/uuid block-id
:block/title (if (ldb/page? block)
(ldb/get-class-title-with-extends block)
(ldb/get-title-with-parents block)
(or snippet title))
:block/page (if (common-util/uuid-string? page)
(uuid page)