Browse Source

enhance(ui): improve property sorting and display with plugin name

charlie 3 weeks ago
parent
commit
f818ba0e59
2 changed files with 7 additions and 2 deletions
  1. 2 1
      src/main/frontend/components/property.cljs
  2. 5 1
      src/main/frontend/db/model.cljs

+ 2 - 1
src/main/frontend/components/property.cljs

@@ -182,7 +182,8 @@
                                        (if plugin?
                                          [:span.pt-1 (shui/tabler-icon "puzzle" {:size 15 :class "opacity-40"})]
                                          [:span.pt-1 (shui/tabler-icon "letter-t" {:size 15 :class "opacity-40"})])
-                                       [:strong.font-normal (:block/title x)]]))
+                                       [:strong.font-normal (:block/title x)
+                                        (when plugin? [:span.ml-1.text-xs.opacity-40 (str "" _plugin-name)])]]))
                            :value (:block/uuid x)
                            :block/title (:block/title x)
                            :convert-page-to-property? convert?})) properties)

+ 5 - 1
src/main/frontend/db/model.cljs

@@ -341,7 +341,11 @@ independent of format as format specific heading characters are stripped"
                  remove-non-queryable-built-in-property? false
                  remove-ui-non-suitable-properties? false}}]
   (let [db (conn/get-db graph)
-        result (sort-by (juxt ldb/built-in? :block/title)
+        result (sort-by (juxt (fn [p] (-> (:db/ident p)
+                                          (db-property/plugin-property?)
+                                          (boolean)))
+                              ldb/built-in?
+                              :block/title)
                         (ldb/get-all-properties db))]
     (cond->> result
       remove-built-in-property?