diff --git a/src/main/frontend/extensions/pdf/toolbar.cljs b/src/main/frontend/extensions/pdf/toolbar.cljs index c2dc596b127..7e965c85607 100644 --- a/src/main/frontend/extensions/pdf/toolbar.cljs +++ b/src/main/frontend/extensions/pdf/toolbar.cljs @@ -3,11 +3,17 @@ [clojure.string :as string] [frontend.components.svg :as svg] [frontend.context.i18n :refer [t]] + [frontend.db.model :as db-model] [frontend.extensions.pdf.assets :as pdf-assets] [frontend.extensions.pdf.utils :as pdf-utils] [frontend.extensions.pdf.windows :refer [resolve-own-container] :as pdf-windows] [frontend.handler.assets :as assets-handler] [frontend.handler.notification :as notification] + [frontend.config :as config] + [frontend.db.conn :as conn] + [logseq.publishing.db :as publish-db] + [frontend.db.utils :as db-utils] + [frontend.db.async :as db-async] [frontend.rum :refer [use-atom]] [frontend.state :as state] [frontend.storage :as storage] @@ -371,6 +377,24 @@ outline-data)] [:section.is-empty "No outlines"])]))) +(rum/defc area-image-for-db + [repo id] + (let [[src set-src!] (rum/use-state nil)] + (rum/use-effect! + (fn [] + (p/let [_ (db-async/ asset-path' (assets-handler/