mirror of https://github.com/logseq/logseq
fix: store icon id and type only instead of full data
parent
c862ad0d10
commit
5c255210b9
|
@ -16,6 +16,8 @@
|
|||
[frontend.config :as config]
|
||||
[frontend.handler.property.util :as pu]))
|
||||
|
||||
(defonce emojis (vals (bean/->clj (gobj/get emoji-data "emojis"))))
|
||||
|
||||
(defn icon
|
||||
[icon & [opts]]
|
||||
(cond
|
||||
|
@ -54,9 +56,6 @@
|
|||
(reset! *tabler-icons result)
|
||||
result)))
|
||||
|
||||
(defonce emojis
|
||||
(vals (bean/->clj (gobj/get emoji-data "emojis"))))
|
||||
|
||||
(defn- search-tabler-icons
|
||||
[q]
|
||||
(search/fuzzy-search (get-tabler-icons) q :limit 100))
|
||||
|
|
|
@ -359,7 +359,7 @@
|
|||
(db-property-handler/set-block-property!
|
||||
(:db/id page)
|
||||
(pu/get-pid :logseq.property/icon)
|
||||
icon))
|
||||
(select-keys icon [:id :type])))
|
||||
:icon-props {:size 38}})
|
||||
icon)])
|
||||
[:h1.page-title.flex-1.cursor-pointer.gap-1
|
||||
|
|
|
@ -173,7 +173,8 @@
|
|||
(re-init-commands! property)))
|
||||
:update-icon
|
||||
(fn [icon]
|
||||
(property-handler/set-block-property! (state/get-current-repo) (:block/uuid block) :logseq.property/icon icon)))
|
||||
(property-handler/set-block-property! (state/get-current-repo) (:block/uuid block) :logseq.property/icon
|
||||
(select-keys icon [:id :type]))))
|
||||
parent-opts))))
|
||||
|
||||
(rum/defc add-existing-values
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
(db-property-handler/set-block-property!
|
||||
(:db/id block)
|
||||
:logseq.property/icon
|
||||
icon))})
|
||||
(select-keys icon [:type :id])))})
|
||||
(when (and icon-value (not config/publishing?))
|
||||
[:a.fade-link.flex {:on-click (fn [_e]
|
||||
(db-property-handler/remove-block-property!
|
||||
|
|
Loading…
Reference in New Issue