Browse Source

fix: block embed wrong indentation

Tienson Qin 4 years ago
parent
commit
fd8736d34f

+ 1 - 1
src/main/frontend/components/block.cljs

@@ -452,7 +452,7 @@
   (let [blocks (db/get-block-and-children (state/get-current-repo) id)]
   (let [blocks (db/get-block-and-children (state/get-current-repo) id)]
     [:div.color-level.embed-block.bg-base-2 {:style {:z-index 2}}
     [:div.color-level.embed-block.bg-base-2 {:style {:z-index 2}}
      [:div.px-3.pt-1.pb-2
      [:div.px-3.pt-1.pb-2
-      (blocks-container blocks (assoc config
+      (blocks-container blocks (assoc (assoc config :id (str id))
                                       :embed? true
                                       :embed? true
                                       :ref? false))]]))
                                       :ref? false))]]))
 
 

+ 1 - 1
src/main/frontend/modules/outliner/tree.cljs

@@ -62,7 +62,7 @@
   [blocks root-id]
   [blocks root-id]
   (let [original-blocks blocks
   (let [original-blocks blocks
         blocks (atom blocks)
         blocks (atom blocks)
-        [page? root] (get-root-and-page root-id)
+        [page? root] (get-root-and-page (str root-id))
         result (blocks->vec-tree-aux blocks root)]
         result (blocks->vec-tree-aux blocks root)]
     (cond
     (cond
       (not root)                        ; custom query
       (not root)                        ; custom query