mirror of https://github.com/logseq/logseq
enhance: different title-key for tag and property nodes
parent
ae746f1a9a
commit
b050d478f6
|
@ -64,6 +64,7 @@
|
|||
(when (false? loading?)
|
||||
(views/view view-entity {:data data
|
||||
:set-data! set-data!
|
||||
:title-key :views.table/tagged-nodes
|
||||
:columns columns
|
||||
:add-new-object! #(add-new-class-object! class set-data!)
|
||||
:create-view! (fn []
|
||||
|
@ -147,6 +148,7 @@
|
|||
(when (false? loading?)
|
||||
(views/view view-entity {:data data
|
||||
:set-data! set-data!
|
||||
:title-key :views.table/property-nodes
|
||||
:columns columns
|
||||
:add-new-object! #(add-new-property-object! property set-data!)
|
||||
:create-view! (fn []
|
||||
|
@ -184,4 +186,4 @@
|
|||
repo (state/get-current-repo)
|
||||
objects (get-property-related-objects repo property)]
|
||||
[:div.ml-2
|
||||
(property-related-objects-inner config property' objects properties)])))
|
||||
(property-related-objects-inner config property' objects properties)])))
|
||||
|
|
|
@ -956,8 +956,9 @@
|
|||
[:div.flex.flex-col.gap-2.grid
|
||||
[:div.flex.items-center.justify-between
|
||||
[:div.flex.flex-row.items-center.gap-2
|
||||
[:div.font-medium (t (or title-key :views.table/default-title)
|
||||
(count (:rows table)))]]
|
||||
[:div.font-medium.opacity-50
|
||||
(t (or title-key :views.table/default-title)
|
||||
(count (:rows table)))]]
|
||||
[:div.flex.items-center.gap-1
|
||||
|
||||
(filter-properties columns table)
|
||||
|
|
|
@ -642,7 +642,9 @@
|
|||
:header/go-forward "Go forward"
|
||||
|
||||
;; E.g. 1 node or 2 nodes
|
||||
:views.table/default-title (fn [total] (str total (if (= total 1) " Node" " Nodes")))
|
||||
:views.table/default-title (fn [total] (str total (if (<= total 1) " Node" " Nodes")))
|
||||
:views.table/tagged-nodes (fn [total] (str total (if (<= total 1) " tagged node" " tagged Nodes")))
|
||||
:views.table/property-nodes (fn [total] (str total (if (<= total 1) " node with this property" " nodes with this property")))
|
||||
|
||||
;; Commands are nested for now to stay in sync with the shortcuts system.
|
||||
;; Other languages should not nest keys under :commands
|
||||
|
|
Loading…
Reference in New Issue