mirror of
https://github.com/logseq/logseq.git
synced 2026-05-24 12:44:22 +00:00
enhance: show Tag and Property classes in page header
Addresses https://github.com/logseq/logseq/pull/11634#discussion_r1901175283
This commit is contained in:
@@ -89,7 +89,8 @@
|
||||
[promesa.core :as p]
|
||||
[reitit.frontend.easy :as rfe]
|
||||
[rum.core :as rum]
|
||||
[shadow.loader :as loader]))
|
||||
[shadow.loader :as loader]
|
||||
[clojure.set :as set]))
|
||||
|
||||
;; local state
|
||||
(defonce *dragging?
|
||||
@@ -2642,12 +2643,15 @@
|
||||
"Tags without inline or hidden tags"
|
||||
[config block]
|
||||
(when (:block/raw-title block)
|
||||
(let [block-tags (->>
|
||||
(let [hidden-internal-tags (cond-> ldb/internal-tags
|
||||
(:show-tag-and-property-classes? config)
|
||||
(set/difference #{:logseq.class/Tag :logseq.class/Property}))
|
||||
block-tags (->>
|
||||
(:block/tags block)
|
||||
(remove (fn [t]
|
||||
(or (ldb/inline-tag? (:block/raw-title block) t)
|
||||
(:logseq.property.class/hide-from-node t)
|
||||
(contains? ldb/internal-tags (:db/ident t))))))
|
||||
(contains? hidden-internal-tags (:db/ident t))))))
|
||||
popup-opts {:align :end
|
||||
:content-props {:on-click (fn [] (shui/popup-hide!))
|
||||
:class "w-60"}}
|
||||
|
||||
@@ -485,6 +485,7 @@
|
||||
:sidebar? sidebar?
|
||||
:hide-children? true
|
||||
:container-id container-id
|
||||
:show-tag-and-property-classes? true
|
||||
:from-journals? (contains? #{:home :all-journals} (get-in (state/get-route-match) [:data :name]))}
|
||||
page)]]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user