enhance: add switch between page and class/property properties

This commit is contained in:
Tienson Qin
2023-10-04 18:49:31 +08:00
parent 10f6fa9f1d
commit 0e63baedef
5 changed files with 100 additions and 92 deletions

View File

@@ -163,3 +163,11 @@
(concat own-properties)
(filter (fn [id] (enum-other-position? id (:block/properties block))))
(distinct))))
(defn block-has-viewable-properties?
[block-entity]
(let [properties (:block/properties block-entity)]
(or
(seq (:block/alias properties))
(and (seq properties)
(not= (keys properties) [(:block/uuid (db/entity [:block/name "icon"]))])))))