diff --git a/src/main/frontend/handler.cljs b/src/main/frontend/handler.cljs index 18a9227fa6..d6b0d95d91 100644 --- a/src/main/frontend/handler.cljs +++ b/src/main/frontend/handler.cljs @@ -30,14 +30,12 @@ [frontend.modules.outliner.file :as file] [frontend.modules.shortcut.core :as shortcut] [frontend.state :as state] - [frontend.storage :as storage] [frontend.ui :as ui] [frontend.util :as util] [frontend.util.persist-var :as persist-var] [goog.object :as gobj] [lambdaisland.glogi :as log] - [promesa.core :as p] - [logseq.db.schema :as db-schema])) + [promesa.core :as p])) (defn set-global-error-notification! [] @@ -75,11 +73,6 @@ (state/pub-event! [:instrument {:type :blocks/count :payload {:total (db/blocks-count)}}]))) -(defn store-schema! - [] - (storage/set :db-schema (assoc db-schema/schema - :db/version db-schema/version))) - (defn restore-and-setup! [repos] (when-let [repo (or (state/get-current-repo) (:url (first repos)))] @@ -112,7 +105,6 @@ (p/then (fn [] (js/console.log "db restored, setting up repo hooks") - (store-schema!) (state/pub-event! [:modal/nfs-ask-permission]) diff --git a/src/main/frontend/handler/global_config.cljs b/src/main/frontend/handler/global_config.cljs index 6fcf2ae6a9..d7d390f3b5 100644 --- a/src/main/frontend/handler/global_config.cljs +++ b/src/main/frontend/handler/global_config.cljs @@ -1,6 +1,6 @@ (ns frontend.handler.global-config "This ns is a system component that encapsulates global config functionality. - Unlike repo config, this also manages a directory for configuration. This app + Unlike repo config, this also manages a directory for configuration. This component depends on a repo." (:require [frontend.config :as config] [frontend.fs :as fs] @@ -44,7 +44,7 @@ (set-global-config-state! default-content))))) (defn restore-global-config! - "Sets global config state from db" + "Sets global config state from config file" [] (let [config-dir (global-config-dir) config-path (global-config-path)] @@ -69,7 +69,7 @@ (defn start "This component has four responsibilities on start: - Fetch root-dir for later use with config paths -- Manage db and ui state of global config +- Manage ui state of global config - Create a global config dir and file if it doesn't exist - Start a file watcher for global config dir" [{:keys [repo]}] diff --git a/src/main/frontend/handler/repo.cljs b/src/main/frontend/handler/repo.cljs index 26935fcc82..400bdd513b 100644 --- a/src/main/frontend/handler/repo.cljs +++ b/src/main/frontend/handler/repo.cljs @@ -382,7 +382,7 @@ _ (db/restore-graph! repo) _ (repo-config-handler/restore-repo-config! repo) _ (global-config-handler/restore-global-config!)] - ;; Don't have to unlisten the old listerner, as it will be destroyed with the conn + ;; Don't have to unlisten the old listener, as it will be destroyed with the conn (db/listen-and-persist! repo) (state/pub-event! [:shortcut/refresh]) (ui-handler/add-style-if-exists!) diff --git a/src/main/frontend/handler/repo_config.cljs b/src/main/frontend/handler/repo_config.cljs index 910dedbe46..02e66c9ba2 100644 --- a/src/main/frontend/handler/repo_config.cljs +++ b/src/main/frontend/handler/repo_config.cljs @@ -1,7 +1,7 @@ (ns frontend.handler.repo-config "This ns is a system component that encapsulates repo config functionality. This component only concerns itself with one user-facing repo config file, - logseq/config.edn. In the future it may manage more files. This app component + logseq/config.edn. In the future it may manage more files. This component depends on a repo." (:require [frontend.db :as db] [frontend.config :as config] diff --git a/src/main/frontend/modules/shortcut/config.cljs b/src/main/frontend/modules/shortcut/config.cljs index 8bc6f48d75..39b6b6c375 100644 --- a/src/main/frontend/modules/shortcut/config.cljs +++ b/src/main/frontend/modules/shortcut/config.cljs @@ -252,7 +252,7 @@ :go/electron-find-in-page {:binding "mod+f" :inactive (not (util/electron?)) :fn #(search-handler/open-find-in-page!)} - + :go/electron-jump-to-the-next {:binding ["enter" "mod+g"] :inactive (not (util/electron?)) :fn #(search-handler/loop-find-in-page! false)} diff --git a/src/main/frontend/spec/storage.cljc b/src/main/frontend/spec/storage.cljc index f69c5edd55..05582d9784 100644 --- a/src/main/frontend/spec/storage.cljc +++ b/src/main/frontend/spec/storage.cljc @@ -3,7 +3,6 @@ #?(:cljs (:require [cljs.spec.alpha :as s]) :default (:require [clojure.spec.alpha :as s]))) -(s/def ::db-schema map?) (s/def ::ls-right-sidebar-state map?) (s/def ::ls-right-sidebar-width string?) (s/def ::ls-left-sidebar-open? boolean?) @@ -36,8 +35,7 @@ (s/def ::local-storage ;; All these keys are optional since we usually only validate one key at a time (s/keys - :opt-un [::db-schema - ::ls-right-sidebar-state + :opt-un [::ls-right-sidebar-state ::ls-right-sidebar-width ::ls-left-sidebar-open? :ui/theme