Browse Source

fix: don't show edit button for page embeds

Tienson Qin 4 years ago
parent
commit
91d48fa87b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/frontend/components/block.cljs

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

@@ -491,6 +491,7 @@
          (blocks-container blocks (assoc config
                                          :id page-name
                                          :embed? true
+                                         :page-embed? true
                                          :ref? false))))]))
 
 (defn- get-label-text
@@ -1543,10 +1544,9 @@
        [:div.flex.flex-1
         (block-content config block edit-input-id block-id slide?)]
        [:div.flex.flex-row
-        (when (:embed? config)
+        (when (and (:embed? config) (not (:page-embed? config)))
           [:a.opacity-30.hover:opacity-100.svg-small.inline
            {:on-mouse-down (fn [e]
-                             (prn "stop e")
                              (util/stop e)
                              (when-let [block (:block config)]
                                (editor-handler/edit-block! block :max (:block/format block) (:block/uuid block))))}