Files
StarPunk/templates/admin/webmention_detail.html
T
PhilandClaude Opus 5.5 55ce6a1fdd feat: backfeed of responses to crossposts (v2.13.0)
Likes, reposts, quotes and replies to a note's GoToSocial, Bluesky and
Threads copies are read back from the silos and stored as webmentions
(ADR-073): age-based schedule to 90 days, pruning of withdrawn responses,
#nobridge/#nobot opt-outs, admin backfill and Check now, Threads counts,
a Quotes group, local avatar copies, and delete tombstones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:19:57 -07:00

112 lines
4.2 KiB
HTML

{% extends "admin/base.html" %}
{% block title %}Webmention Detail - StarPunk Admin{% endblock %}
{% block admin_content %}
<div class="webmention-detail">
<h2>Webmention Detail</h2>
<div class="dashboard-actions">
<a href="{{ url_for('admin.webmentions') }}" class="button">
Back to Webmentions
</a>
</div>
<div class="detail-card">
<div class="detail-row">
<strong>Source:</strong>
<a href="{{ webmention.source_url }}" target="_blank">{{ webmention.source_url }}</a>
{% if webmention.origin and webmention.origin != 'webmention' %}<small>(backfed from {{ webmention.origin }})</small>{% endif %}
</div>
<div class="detail-row">
<strong>Target:</strong>
{% if webmention.target_note_id %}
<a href="{{ url_for('public.note', slug=webmention.target_slug) }}">{{ webmention.target_url }}</a>
{% else %}
{{ webmention.target_url }} (Homepage)
{% endif %}
</div>
<div class="detail-row">
<strong>Type:</strong>
<span class="badge badge-{{ webmention.mention_type }}">{{ webmention.mention_type }}</span>
</div>
<div class="detail-row">
<strong>Author:</strong>
{{ webmention.author_name or 'Anonymous' }}
{% if webmention.author_url %}
(<a href="{{ webmention.author_url }}" target="_blank">{{ webmention.author_url }}</a>)
{% endif %}
</div>
{% if webmention.author_photo %}
<div class="detail-row">
<strong>Author Photo:</strong>
{% set photo = webmention.author_photo|local_avatar %}
{% if photo %}<img src="{{ photo }}" alt="{{ webmention.author_name or 'Author' }}" width="48" height="48" loading="lazy">{% endif %}
<a href="{{ webmention.author_photo }}" rel="noopener" target="_blank">{{ webmention.author_photo|truncate(60) }}</a>
</div>
{% endif %}
{% if webmention.content_snippet %}
<div class="detail-row">
<strong>Content:</strong>
<div class="content-preview">{{ webmention.content_snippet|safe }}</div>
</div>
{% endif %}
<div class="detail-row">
<strong>Validation Status:</strong>
<span class="status-badge status-{{ webmention.validation_status }}">{{ webmention.validation_status }}</span>
{% if webmention.validation_error %}
<br><small class="error-text">{{ webmention.validation_error }}</small>
{% endif %}
</div>
<div class="detail-row">
<strong>Moderation Status:</strong>
<span class="status-badge status-{{ webmention.moderation_status }}">{{ webmention.moderation_status }}</span>
</div>
<div class="detail-row">
<strong>Received:</strong>
{{ webmention.received_at.strftime('%B %d, %Y at %I:%M %p') }}
</div>
{% if webmention.validated_at %}
<div class="detail-row">
<strong>Validated:</strong>
{{ webmention.validated_at.strftime('%B %d, %Y at %I:%M %p') }}
</div>
{% endif %}
</div>
{# Moderation Actions #}
<div class="moderation-actions">
<h3>Actions</h3>
<form method="POST" action="{{ url_for('admin.webmention_action', id=webmention.id) }}" style="display: inline;"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="action" value="approve">
<button type="submit" class="button button-primary" {% if webmention.moderation_status == 'approved' %}disabled{% endif %}>
Approve
</button>
</form>
<form method="POST" action="{{ url_for('admin.webmention_action', id=webmention.id) }}" style="display: inline;"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="action" value="hide">
<button type="submit" class="button" {% if webmention.moderation_status == 'hidden' %}disabled{% endif %}>
Hide
</button>
</form>
<form method="POST" action="{{ url_for('admin.webmention_action', id=webmention.id) }}" style="display: inline;"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="action" value="delete">
<button type="submit" class="button button-danger" onclick="return confirm('Delete this webmention permanently?')">
Delete
</button>
</form>
</div>
</div>
{% endblock %}