feat: render DM conversations as threaded view on mention tab

This commit is contained in:
svemagie
2026-03-13 07:27:12 +01:00
parent 51a8abb0a2
commit bf6262e2c6
+28 -15
View File
@@ -48,22 +48,35 @@
</form> </form>
</div> </div>
{% if items.length > 0 %} {% if tab == "mention" %}
<div class="ap-timeline"> {# DM thread view — grouped by conversation #}
{% for item in items %} {% if conversations and conversations.length > 0 %}
{% include "partials/ap-notification-card.njk" %} <div class="ap-dm-conversations">
{% endfor %} {% for conv in conversations %}
</div> {% include "partials/ap-dm-thread.njk" %}
{% endfor %}
{# Pagination — preserve active tab #} </div>
{% if before %} {% else %}
<nav class="ap-pagination"> {{ prose({ text: "No direct messages yet." }) }}
<a href="?tab={{ tab }}&before={{ before }}" class="ap-pagination__next">
{{ __("activitypub.reader.pagination.older") }}
</a>
</nav>
{% endif %} {% endif %}
{% else %} {% else %}
{{ prose({ text: __("activitypub.notifications.empty") }) }} {% if items.length > 0 %}
<div class="ap-timeline">
{% for item in items %}
{% include "partials/ap-notification-card.njk" %}
{% endfor %}
</div>
{# Pagination — preserve active tab #}
{% if before %}
<nav class="ap-pagination">
<a href="?tab={{ tab }}&before={{ before }}" class="ap-pagination__next">
{{ __("activitypub.reader.pagination.older") }}
</a>
</nav>
{% endif %}
{% else %}
{{ prose({ text: __("activitypub.notifications.empty") }) }}
{% endif %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}