File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 274274 new-result)))]))
275275
276276(defn page-item
277- [repo page]
278- (let [entity (db/entity [:block/uuid (:block/uuid page)])
277+ [repo page input]
278+ (let [entity (-> (or (db/entity [:block/uuid (:block/uuid page)]) page)
279+ (update :block/tags (fn [tags]
280+ (map (fn [tag]
281+ (if (integer? tag)
282+ (db/entity tag)
283+ tag)) tags))))
279284 source-page (or (model/get-alias-source-page repo (:db/id entity))
280285 (:alias page))
281286 icon (icon-component/get-node-icon-cp entity {:ignore-current-icon? true })
282- title (block-handler/block-unique-title ( or entity page)
287+ title (block-handler/block-unique-title entity
283288 {:alias (:block/title source-page)})]
284289 (hash-map :icon icon
285290 :icon-theme :gray
286- :text title
291+ :text ( highlight-content-query title input)
287292 :header (when (:block/parent entity)
288293 (block/breadcrumb {:disable-preview? true
289294 :search? true } repo (:block/uuid page)
321326 (p/let [blocks (search/block-search repo @!input opts)
322327 blocks (remove nil? blocks)
323328 items (keep (fn [block]
329+ (prn :debug :block block)
324330 (if (:page? block)
325- (page-item repo block)
331+ (page-item repo block @!input )
326332 (block-item repo block current-page @!input))) blocks)]
327333 (if (= group :current-page )
328334 (let [items-on-current-page (filter :current-page? items)]
Original file line number Diff line number Diff line change 1919 :extract-fn :block/title })
2020 items (keep (fn [block]
2121 (if (:page? block)
22- (assoc (cmdk/page-item repo block) :page? true )
22+ (assoc (cmdk/page-item repo block input ) :page? true )
2323 (cmdk/block-item repo block nil input))) blocks)]
2424 items))
2525
You can’t perform that action at this time.
0 commit comments