mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 14:39:48 +00:00
property uuid key
This commit is contained in:
@@ -82,12 +82,11 @@
|
||||
(when (seq properties)
|
||||
[:div
|
||||
(for [[prop-uuid-or-built-in-prop v] properties]
|
||||
(if (and (string? prop-uuid-or-built-in-prop)
|
||||
(util/uuid-string? prop-uuid-or-built-in-prop))
|
||||
(when-let [property-class (db/pull [:block/uuid (uuid prop-uuid-or-built-in-prop)])]
|
||||
(if (uuid? prop-uuid-or-built-in-prop)
|
||||
(when-let [property-class (db/pull [:block/uuid prop-uuid-or-built-in-prop])]
|
||||
[:div
|
||||
[:a.mr-2
|
||||
{:on-click (fn [] (state/set-modal! #(property-class-config repo (uuid prop-uuid-or-built-in-prop))))}
|
||||
{:on-click (fn [] (state/set-modal! #(property-class-config repo prop-uuid-or-built-in-prop)))}
|
||||
(:block/name property-class)]
|
||||
[:span (or (get properties-text-values prop-uuid-or-built-in-prop) (str v))]
|
||||
[:a.ml-8 {:on-click
|
||||
|
||||
@@ -1170,8 +1170,8 @@ independent of format as format specific heading characters are stripped"
|
||||
(apply concat)
|
||||
distinct
|
||||
(map (fn [k]
|
||||
(if (and (string? k) (util/uuid-string? k))
|
||||
(keyword (:block/name (d/entity db [:block/uuid (uuid k)])))
|
||||
(if (uuid? k)
|
||||
(keyword (:block/name (d/entity db [:block/uuid k])))
|
||||
k)))
|
||||
sort)))
|
||||
|
||||
|
||||
@@ -90,14 +90,14 @@
|
||||
:block/uuid property-class-uuid
|
||||
:block/type "property"}]))
|
||||
(let [block-properties (assoc (:block/properties block)
|
||||
(str property-class-uuid)
|
||||
property-class-uuid
|
||||
(if (= property-schema :string-contains-refs)
|
||||
(set (extract-page-refs-from-prop-str-value v*))
|
||||
v*))
|
||||
block-properties-text-values
|
||||
(if (= property-schema :string-contains-refs)
|
||||
(assoc (:block/properties-text-values block) (str property-class-uuid) v*)
|
||||
(dissoc (:block/properties-text-values block) (str property-class-uuid)))]
|
||||
(assoc (:block/properties-text-values block) property-class-uuid v*)
|
||||
(dissoc (:block/properties-text-values block) property-class-uuid))]
|
||||
(outliner-tx/transact!
|
||||
{:outliner-op :save-block}
|
||||
(outliner-core/save-block!
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
js/Symbol
|
||||
(-pr-writer [sym writer _]
|
||||
(-write writer (str "\"" (.toString sym) "\"")))))
|
||||
#?(:cljs
|
||||
(extend-protocol INamed
|
||||
UUID
|
||||
(-name [this] (str this))
|
||||
(-namespace [_] nil)))
|
||||
|
||||
|
||||
#?(:cljs (defonce ^js node-path utils/nodePath))
|
||||
#?(:cljs (defonce ^js full-path-extname pathCompleteExtname))
|
||||
|
||||
Reference in New Issue
Block a user