Right click on Reply & CC> to see everyone mentioned in the event.

This commit is contained in:
Robert C. Martin 2023-05-18 12:18:13 -05:00
parent 23578f5438
commit b1c06c0ea6

View File

@ -194,6 +194,16 @@
(defn popup-zaps [_e] (defn popup-zaps [_e]
(map format-zap (:zaps (get-mem [:article-panel :event])))) (map format-zap (:zaps (get-mem [:article-panel :event]))))
(defn popup-mentions [_e]
(let [event (get-mem [:article-panel :event])
p-tags (events/get-tag event :p)
hex-ids (map first p-tags)
ids (map util/unhexify hex-ids)
names (map #(formatters/format-user-id % 50) ids)
]
names)
)
(defn make-article-info-panel [] (defn make-article-info-panel []
(let [author-name-label (label :id :author-name-label) (let [author-name-label (label :id :author-name-label)
label-font (uconfig/get-small-font) label-font (uconfig/get-small-font)
@ -215,11 +225,11 @@
:items [ :items [
(flow-panel :align :left :items [(bold-label "Author:") author-name-label zap-icon]) (flow-panel :align :left :items [(bold-label "Author:") author-name-label zap-icon])
(flow-panel :align :left :items [(bold-label "Subject:") subject-label]) (flow-panel :align :left :items [(bold-label "Subject:") subject-label])
(flow-panel :align :left :items [(popup-label "Reactions▶:" popup-reactions) reactions-label up-arrow dn-arrow]) (flow-panel :align :left :items [(popup-label "Reactions▶" popup-reactions) reactions-label up-arrow dn-arrow])
(flow-panel :align :left :items [(bold-label "Created at:") created-time-label]) (flow-panel :align :left :items [(bold-label "Created at:") created-time-label])
(flow-panel :align :left :items [(bold-label "Reply to:") reply-to-label]) (flow-panel :align :left :items [(popup-label "Reply & CC▶" popup-mentions) reply-to-label])
(flow-panel :align :left :items [(popup-label "Relays▶:" popup-relays) relays-label]) (flow-panel :align :left :items [(popup-label "Relays▶" popup-relays) relays-label])
(flow-panel :align :left :items [(bold-label "id:") id-label]) (flow-panel :align :left :items [(bold-label "id:") id-label])
(flow-panel :align :left :items [(bold-label "Citing:") citing-label]) (flow-panel :align :left :items [(bold-label "Citing:") citing-label])