From 2fc85474a53debb8f11c9db40b234420ebe32df2 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Fri, 13 Mar 2026 07:27:13 +0100 Subject: [PATCH] feat: add ap-dm-thread.njk chat-style conversation partial --- views/partials/ap-dm-thread.njk | 66 +++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 views/partials/ap-dm-thread.njk diff --git a/views/partials/ap-dm-thread.njk b/views/partials/ap-dm-thread.njk new file mode 100644 index 0000000..84e9f9c --- /dev/null +++ b/views/partials/ap-dm-thread.njk @@ -0,0 +1,66 @@ +{# DM conversation thread — chat-style view for a single peer #} + +
+ + {# Conversation header — peer info #} +
+
+ {% if conv.peerPhoto %} + {{ conv.peerName }} + + {% else %} + + {% endif %} +
+
+ + {{ conv.peerName or conv.peerHandle or conv.peerUrl }} + + {% if conv.peerHandle %} + {{ conv.peerHandle }} + {% endif %} +
+ 🔒 +
+ + {# Messages in chronological order #} +
+ {% for msg in conv.messages %} +
+
+ {% if msg.content and msg.content.html %} + {{ msg.content.html | safe }} + {% elif msg.content and msg.content.text %} + {{ msg.content.text }} + {% endif %} +
+ {% if msg.published %} + + {% endif %} +
+ {% endfor %} +
+ + {# Inline reply form #} +
+ + + + {% if conv.messages | length %} + + {% endif %} +
+ + +
+
+ +