mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
- Outbound Delete: broadcastDelete() + POST /admin/federation/delete route - Visibility: unlisted + followers-only addressing via defaultVisibility config - Content Warning: outbound sensitive flag + summary as CW text - Polls: inbound Question/poll parsing with progress bar rendering - Flag: inbound report handler with ap_reports collection + Reports tab - Includes DM support files from v2.9.x (messages controller, storage, templates) - Includes coverage audit and high-impact gaps implementation plan Confab-Link: http://localhost:8080/sessions/cc343b15-8d10-43cd-a48f-ca912eb79b83
79 lines
3.3 KiB
Plaintext
79 lines
3.3 KiB
Plaintext
{% extends "layouts/ap-reader.njk" %}
|
|
|
|
{% from "heading/macro.njk" import heading with context %}
|
|
{% from "prose/macro.njk" import prose with context %}
|
|
|
|
{% block readercontent %}
|
|
{# Toolbar — compose + mark read + clear all #}
|
|
{% set msgBase = mountPath + "/admin/reader/messages" %}
|
|
<div class="ap-notifications__toolbar">
|
|
<a href="{{ msgBase }}/compose" class="ap-notifications__btn ap-notifications__btn--primary">
|
|
{{ __("activitypub.messages.compose") }}
|
|
</a>
|
|
{% if unreadCount > 0 %}
|
|
<form method="post" action="{{ msgBase }}/mark-read">
|
|
<input type="hidden" name="_csrf" value="{{ csrfToken }}">
|
|
<button type="submit" class="ap-notifications__btn">{{ __("activitypub.messages.markAllRead") }}</button>
|
|
</form>
|
|
{% endif %}
|
|
<form method="post" action="{{ msgBase }}/clear"
|
|
onsubmit="return confirm('{{ __("activitypub.messages.clearConfirm") }}')">
|
|
<input type="hidden" name="_csrf" value="{{ csrfToken }}">
|
|
<button type="submit" class="ap-notifications__btn ap-notifications__btn--danger">{{ __("activitypub.messages.clearAll") }}</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="ap-messages__layout">
|
|
{# Conversation partner sidebar #}
|
|
{% if partners.length > 0 %}
|
|
<aside class="ap-messages__sidebar">
|
|
<a href="{{ msgBase }}" class="ap-messages__partner{% if not activePartner %} ap-messages__partner--active{% endif %}">
|
|
{{ __("activitypub.messages.allConversations") }}
|
|
</a>
|
|
{% for p in partners %}
|
|
<a href="{{ msgBase }}?partner={{ p._id | urlencode }}"
|
|
class="ap-messages__partner{% if activePartner == p._id %} ap-messages__partner--active{% endif %}">
|
|
<span class="ap-messages__partner-avatar" data-avatar-fallback>
|
|
{% if p.actorPhoto %}
|
|
<img src="{{ p.actorPhoto }}" alt="{{ p.actorName }}" loading="lazy" crossorigin="anonymous">
|
|
{% endif %}
|
|
<span class="ap-messages__partner-initial" aria-hidden="true">{{ p.actorName[0] | upper if p.actorName else "?" }}</span>
|
|
</span>
|
|
<span class="ap-messages__partner-info">
|
|
<span class="ap-messages__partner-name">{{ p.actorName }}</span>
|
|
{% if p.actorHandle %}
|
|
<span class="ap-messages__partner-handle">{{ p.actorHandle }}</span>
|
|
{% endif %}
|
|
</span>
|
|
{% if p.unreadCount > 0 %}
|
|
<span class="ap-tab__count">{{ p.unreadCount }}</span>
|
|
{% endif %}
|
|
</a>
|
|
{% endfor %}
|
|
</aside>
|
|
{% endif %}
|
|
|
|
{# Messages list #}
|
|
<div class="ap-messages__content">
|
|
{% if items.length > 0 %}
|
|
<div class="ap-timeline">
|
|
{% for item in items %}
|
|
{% include "partials/ap-message-card.njk" %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{# Pagination — preserve active partner #}
|
|
{% if before %}
|
|
<nav class="ap-pagination">
|
|
<a href="?{% if activePartner %}partner={{ activePartner | urlencode }}&{% endif %}before={{ before }}" class="ap-pagination__next">
|
|
{{ __("activitypub.reader.pagination.older") }}
|
|
</a>
|
|
</nav>
|
|
{% endif %}
|
|
{% else %}
|
|
{{ prose({ text: __("activitypub.messages.empty") }) }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|