Merge branch 'master' into feat/custom-children-list-style

pull/9269/head
charlie 2023-04-26 17:02:13 +08:00
commit 0805d87eab
1 changed files with 10 additions and 9 deletions

View File

@ -317,16 +317,17 @@
:page-content
(let [{:block/keys [snippet uuid]} data ;; content here is normalized
repo (state/sub :git/current-repo)
page (model/query-block-by-uuid uuid) ;; it's actually a page
page (when uuid (model/query-block-by-uuid uuid)) ;; it's actually a page
format (db/get-page-format page)]
[:span {:data-block-ref uuid}
(search-result-item {:name "page"
:title (t :search-item/page)
:extension? true}
(if page
(page-content-search-result-item repo uuid format snippet search-q search-mode)
(do (log/error "search result with non-existing uuid: " data)
(str "Cache is outdated. Please click the 'Re-index' button in the graph's dropdown menu."))))])
(when page
[:span {:data-block-ref uuid}
(search-result-item {:name "page"
:title (t :search-item/page)
:extension? true}
(if page
(page-content-search-result-item repo uuid format snippet search-q search-mode)
(do (log/error "search result with non-existing uuid: " data)
(str "Cache is outdated. Please click the 'Re-index' button in the graph's dropdown menu."))))]))
nil)]))