mirror of https://github.com/logseq/logseq
fix: frontend lints
parent
0f3ff53c81
commit
bc3298a436
|
@ -7,8 +7,7 @@
|
|||
[frontend.ui :as ui]
|
||||
[rum.core :as rum]
|
||||
[frontend.components.block :as block]
|
||||
[logseq.shui.ui :as shui]
|
||||
[logseq.db.frontend.property :as db-property]))
|
||||
[logseq.shui.ui :as shui]))
|
||||
|
||||
(rum/defc class-select
|
||||
[page class on-select]
|
||||
|
|
|
@ -73,12 +73,6 @@
|
|||
[repo]
|
||||
(swap! conns dissoc (datascript-db repo)))
|
||||
|
||||
(defn kv
|
||||
[key value & {:keys [id]}]
|
||||
{:db/id (or id -1)
|
||||
:db/ident key
|
||||
key value})
|
||||
|
||||
(if util/node-test?
|
||||
(defn transact!
|
||||
([repo tx-data]
|
||||
|
|
|
@ -768,13 +768,6 @@ independent of format as format specific heading characters are stripped"
|
|||
{:id (str uuid)
|
||||
:nonce (:nonce shape)}))))))
|
||||
|
||||
(defn get-all-properties
|
||||
[repo]
|
||||
(when-let [db (conn/get-db repo)]
|
||||
(->> (d/datoms db :avet :block/type "property")
|
||||
(map (fn [d]
|
||||
(d/entity db (:e d)))))))
|
||||
|
||||
(defn get-all-classes
|
||||
[repo]
|
||||
(d/q
|
||||
|
|
|
@ -29,9 +29,8 @@
|
|||
[frontend.handler.plugin :as plugin-handler]
|
||||
[frontend.handler.common.plugin :as plugin-common-handler]
|
||||
[frontend.handler.property :as property-handler]
|
||||
[frontend.handler.property.util :as pu]
|
||||
[frontend.handler.db-based.property.util :as db-pu]
|
||||
[frontend.handler.db-based.property :as db-p]
|
||||
[frontend.handler.db-based.property :as db-property-handler]
|
||||
[logseq.outliner.core :as outliner-core]
|
||||
[frontend.modules.outliner.tree :as outliner-tree]
|
||||
[frontend.handler.command-palette :as palette-handler]
|
||||
|
@ -53,7 +52,7 @@
|
|||
[logseq.api.block :as api-block]
|
||||
[logseq.db :as ldb]
|
||||
[logseq.db.frontend.property.util :as db-property-util]
|
||||
[logseq.db.frontend.property :as ldb-property]))
|
||||
[logseq.db.frontend.property :as db-property]))
|
||||
|
||||
;; Alert: this namespace shouldn't invoke any reactive queries
|
||||
|
||||
|
@ -797,8 +796,8 @@
|
|||
_ (db-async/<get-block repo block-uuid :children? false)
|
||||
db? (config/db-based-graph? repo)
|
||||
key (-> (if (keyword? key) (name key) key) (util/safe-lower-case))
|
||||
key (if db? (ldb-property/create-user-property-ident-from-name key) key)
|
||||
_ (when db? (db-p/upsert-property! key {} {}))]
|
||||
key (if db? (db-property/create-user-property-ident-from-name key) key)
|
||||
_ (when db? (db-property-handler/upsert-property! key {} {}))]
|
||||
(property-handler/set-block-property! repo block-uuid key value))))
|
||||
|
||||
(def ^:export remove_block_property
|
||||
|
@ -808,7 +807,7 @@
|
|||
db? (config/db-based-graph? (state/get-current-repo))
|
||||
key-ns? (and (keyword? key) (namespace key))
|
||||
key (if key-ns? key (-> (if (keyword? key) (name key) key) (util/safe-lower-case)))
|
||||
key (if (and db? (not key-ns?)) (ldb-property/create-user-property-ident-from-name key) key)]
|
||||
key (if (and db? (not key-ns?)) (db-property/create-user-property-ident-from-name key) key)]
|
||||
(property-handler/remove-block-property!
|
||||
(state/get-current-repo)
|
||||
block-uuid key))))
|
||||
|
|
Loading…
Reference in New Issue