chore: move block-unique-title to handler

This commit is contained in:
Tienson Qin
2024-12-10 17:08:19 +08:00
parent 7d961ca915
commit 7f80b5c365
7 changed files with 37 additions and 43 deletions

View File

@@ -15,7 +15,6 @@
[frontend.components.block :as block]
[dommy.core :as d]
[frontend.components.content :as cp-content]
[frontend.components.title :as title]
[frontend.config :as config]
[frontend.context.i18n :refer [t]]
[frontend.db :as db]
@@ -32,6 +31,7 @@
[frontend.handler.user :as user-handler]
[frontend.handler.whiteboard :as whiteboard-handler]
[frontend.handler.recent :as recent-handler]
[frontend.handler.block :as block-handler]
[frontend.mixins :as mixins]
[frontend.mobile.action-bar :as action-bar]
[frontend.mobile.footer :as footer]
@@ -133,7 +133,7 @@
:class "w-60"}})
(util/stop e))}
(ldb/object? page)
(assoc :title (title/block-unique-title page)))
(assoc :title (block-handler/block-unique-title page)))
[:span.page-icon.ml-3.justify-center icon]
[:span.page-title {:class (when untitled? "opacity-50")
:style {:display "ruby"}}
@@ -206,7 +206,7 @@
(for [page pages]
[:li.recent-item.select-none
{:key (str "recent-" (:db/id page))
:title (title/block-unique-title page)
:title (block-handler/block-unique-title page)
:draggable true
:on-drag-start (fn [event] (editor-handler/block->data-transfer! (:block/name page) event true))
:data-ref name}