Tienson Qin 2 лет назад
Родитель
Сommit
559e38ac50

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

@@ -1,4 +1,5 @@
 (ns frontend.handler.worker
+  "Handle messages received from the db worker"
   (:require [cljs-bean.core :as bean]
             [frontend.handler.file :as file-handler]
             [frontend.handler.notification :as notification]

+ 1 - 0
src/main/frontend/modules/file/core.cljs

@@ -1,4 +1,5 @@
 (ns frontend.modules.file.core
+  "Convert block trees to content"
   (:require [clojure.string :as string]
             [frontend.db :as db]
             [frontend.state :as state]

+ 9 - 10
src/main/frontend/persist_db/browser.cljs

@@ -85,16 +85,15 @@
       (when-not (:pipeline-replace? tx-meta) ; from db worker
         (let [tx-meta' (pr-str tx-meta)
               tx-data' (pr-str tx-data)
-              context (if (config/db-based-graph? repo)
-                        {:dev? config/dev?
-                         :validate-db-options (:dev/validate-db-options (state/get-config))}
-                        {:importing? (:graph/importing @state/state)
-                         :date-formatter (state/get-date-formatter)
-                         :export-bullet-indentation (state/get-export-bullet-indentation)
-                         :preferred-format (state/get-preferred-format)
-                         :journals-directory (config/get-journals-directory)
-                         :whiteboards-directory (config/get-whiteboards-directory)
-                         :pages-directory (config/get-pages-directory)})]
+              context {:dev? config/dev?
+                       :validate-db-options (:dev/validate-db-options (state/get-config))
+                       :importing? (:graph/importing @state/state)
+                       :date-formatter (state/get-date-formatter)
+                       :export-bullet-indentation (state/get-export-bullet-indentation)
+                       :preferred-format (state/get-preferred-format)
+                       :journals-directory (config/get-journals-directory)
+                       :whiteboards-directory (config/get-whiteboards-directory)
+                       :pages-directory (config/get-pages-directory)}]
           (if sqlite
             (p/let [result (.transact sqlite repo tx-data' tx-meta'
                                       (pr-str context))

+ 1 - 0
src/main/frontend/worker/date.cljs

@@ -1,4 +1,5 @@
 (ns frontend.worker.date
+  "Date related fns that used by worker"
   (:require [cljs-time.format :as tf]
             [logseq.graph-parser.util :as gp-util]))
 

+ 1 - 0
src/main/frontend/worker/file/core.cljs

@@ -1,4 +1,5 @@
 (ns frontend.worker.file.core
+  "Save file to disk"
   (:require [clojure.string :as string]
             [frontend.worker.file.util :as wfu]
             [frontend.worker.file.property-util :as property-util]

+ 1 - 0
src/main/frontend/worker/file/util.cljs

@@ -1,4 +1,5 @@
 (ns frontend.worker.file.util
+  "File name fns"
   (:require [clojure.string :as string]
             [logseq.graph-parser.util :as gp-util]
             [frontend.worker.util :as util]))

+ 1 - 0
src/main/frontend/worker/state.cljs

@@ -1,4 +1,5 @@
 (ns frontend.worker.state
+  "State hub for worker"
   (:require [frontend.worker.util :as worker-util]))
 
 (defonce *state (atom {:db/latest-transact-time {}