File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 281
281
(defn- page-item
282
282
[repo page]
283
283
(let [entity (db/entity [:block/uuid (:block/uuid page)])
284
- source-page (model/get-alias-source-page repo (:db/id entity))
284
+ source-page (or (:block/title (model/get-alias-source-page repo (:db/id entity)))
285
+ (:alias page))
285
286
icon (get-page-icon entity)
286
287
title (block-handler/block-unique-title page)
287
- title' (if source-page (str title " -> alias: " ( :block/title source-page) ) title)]
288
+ title' (if source-page (str title " -> alias: " source-page) title)]
288
289
(hash-map :icon icon
289
290
:icon-theme :gray
290
291
:text title'
Original file line number Diff line number Diff line change 186
186
:item-render (fn [block _chosen?]
187
187
(let [block' (if-let [id (:block/uuid block)]
188
188
(if-let [e (db/entity [:block/uuid id])]
189
- (assoc e :block/title (:block/title block))
189
+ (assoc e
190
+ :block/title (:block/title block)
191
+ :alias (:alias block))
190
192
block)
191
193
block)]
192
194
[:div.flex.flex-col
221
223
:else
222
224
(ui/icon " letter-n" {:size 14 }))])
223
225
224
- (let [title (let [target ( first ( :block/_alias block') )
226
+ (let [title (let [alias ( :alias block')
225
227
title (if (and db-based? (not (ldb/built-in? block')))
226
228
(block-handler/block-unique-title block')
227
229
(:block/title block'))]
228
- (if target
229
- (str title " -> alias: " ( :block/title target) )
230
+ (if alias
231
+ (str title " -> alias: " alias )
230
232
title))]
231
233
(if (or (string/starts-with? title (t :new-tag ))
232
234
(string/starts-with? title (t :new-page )))
Original file line number Diff line number Diff line change @@ -325,7 +325,8 @@ DROP TRIGGER IF EXISTS blocks_au;
325
325
(uuid page)
326
326
nil )
327
327
:block/tags (seq (map :db/id (:block/tags block)))
328
- :page? (ldb/page? block)}))))))
328
+ :page? (ldb/page? block)
329
+ :alias (:block/title (first (:block/_alias block)))}))))))
329
330
page-or-object-result (filter (fn [b] (or (:page? b) (:block/tags result))) result)]
330
331
(->>
331
332
(concat page-or-object-result
You can’t perform that action at this time.
0 commit comments