Просмотр исходного кода

fix: block background && repeat parents

Tienson Qin 4 лет назад
Родитель
Сommit
c61a93112e

+ 4 - 3
src/main/frontend/components/block.cljs

@@ -1545,9 +1545,10 @@
 
                         (when (seq parents)
                           (let [parents (doall
-                                         (for [{:block/keys [uuid title]} parents]
-                                           [:a {:href (rfe/href :page {:name uuid})}
-                                            (map-inline config title)]))
+                                         (for [{:block/keys [uuid title name]} parents]
+                                           (when-not name ; not page
+                                             [:a {:href (rfe/href :page {:name uuid})}
+                                             (map-inline config title)])))
                                 parents (remove nil? parents)]
                             (reset! parents-atom parents)
                             (when (seq parents)

+ 0 - 1
src/main/frontend/handler/editor.cljs

@@ -716,7 +716,6 @@
 (defn- block-property-aux!
   [block-id key value]
   (let [block-id (if (string? block-id) (uuid block-id) block-id)
-        key (string/lower-case (name key))
         repo (state/get-current-repo)]
     (when repo
       (when-let [block (db/entity [:block/uuid block-id])]

+ 1 - 1
src/main/frontend/util.cljc

@@ -139,7 +139,7 @@
   (walk/postwalk
    (fn [el]
      (if (map? el)
-       (not-empty (into {} (remove (comp nil? second)) el))
+       (into {} (remove (comp nil? second)) el)
        el))
    nm))