Jelajahi Sumber

fix: merge issues

Peng Xiao 3 tahun lalu
induk
melakukan
3d8fa09d0d

+ 5 - 6
deps/graph-parser/src/logseq/graph_parser.cljs

@@ -45,14 +45,13 @@
               block-ids (set/union (set block-ids) (set block-refs-ids))
               pages (extract/with-ref-pages pages blocks)
               pages-index (map #(select-keys % [:block/name]) pages)]
-               ;; does order matter?
-               {:tx (concat file-content pages-index delete-blocks pages block-ids blocks)
-                :ast ast})
-             {:tx file-content})
+              ;; does order matter?
+          {:tx (concat file-content pages-index delete-blocks pages block-ids blocks)
+           :ast ast})
         tx (concat tx [(cond-> {:file/path file
                                 :file/content content}
-                               new?
-                               ;; TODO: use file system timestamp?
+                         new?
+                         ;; TODO: use file system timestamp?
                          (assoc :file/created-at (date-time-util/time-ms)))])
         tx' (gp-util/remove-nils tx)
         result (if skip-db-transact?

+ 0 - 1
src/main/frontend/components/sidebar.cljs

@@ -407,7 +407,6 @@
          [:div
           {:class (if margin-less-pages? "" (util/hiccup->class "mx-auto.pb-24"))
            :style {:margin-bottom (cond
-                                    global-graph-pages? 0
                                     margin-less-pages? 0
                                     onboarding-and-home? -48
                                     :else 120)

+ 8 - 0
src/main/frontend/state.cljs

@@ -542,6 +542,14 @@ Similar to re-frame subscriptions"
   []
   (sub :feature/enable-sync?))
 
+(defn enable-whiteboards?
+  ([]
+   (enable-whiteboards? (get-current-repo)))
+  ([repo]
+   (and
+    (util/electron?)
+    (not (false? (:feature/enable-whiteboards? (sub-config repo)))))))
+
 (defn export-heading-to-list?
   []
   (not (false? (:export/heading-to-list? (sub-config)))))