Files
indiekit-endpoint-activitypub/views/activitypub-dashboard.njk
Ricardo deb9cb54a3 fix: prefix view templates to avoid Nunjucks name collisions
Rename all views to activitypub-*.njk to prevent collisions with other
plugins that have dashboard.njk (podroll). Fix all new Date() calls to
use .toISOString() per Indiekit convention. Add try-catch in syndicator
to prevent delivery failures from crashing post creation.
2026-02-18 23:10:35 +01:00

46 lines
1.3 KiB
Plaintext

{% extends "document.njk" %}
{% from "heading/macro.njk" import heading with context %}
{% from "card/macro.njk" import card with context %}
{% from "card-grid/macro.njk" import cardGrid with context %}
{% from "prose/macro.njk" import prose with context %}
{% from "badge/macro.njk" import badge with context %}
{% block content %}
{{ heading({ text: title, level: 1 }) }}
{{ cardGrid({ cardSize: "16rem", items: [
{
title: followerCount + " " + __("activitypub.followers"),
url: mountPath + "/admin/followers"
},
{
title: followingCount + " " + __("activitypub.following"),
url: mountPath + "/admin/following"
},
{
title: __("activitypub.activities"),
url: mountPath + "/admin/activities"
},
{
title: __("activitypub.migrate"),
url: mountPath + "/admin/migrate"
}
]}) }}
{{ heading({ text: __("activitypub.recentActivity"), level: 2 }) }}
{% if recentActivities.length > 0 %}
{% for activity in recentActivities %}
{{ card({
title: activity.actorName or activity.actorUrl,
description: { text: activity.summary },
published: activity.receivedAt,
badges: [{ text: activity.type }]
}) }}
{% endfor %}
{% else %}
{{ prose({ text: __("activitypub.noActivity") }) }}
{% endif %}
{% endblock %}