- All dependencies to current releases (97 known vulnerabilities -> 0), Python 3.14, uv pinned, requirements-test.txt, lxml/dateutil pinned - CSRF tokens on admin forms, logout and IndieAuth consent - IndieAuth client and crosspost link-card fetches via safe_get - FLASK_DEBUG/FLASK_ENV default off/production; image sets them - Foreign keys enforced on pooled connections; migration 018 removes orphans - Rate limits shared across processes (rate_limits, migration 019) - datetime.utcnow() and sqlite3 default adapters replaced - compose.yaml fixed; duplicate dev_auth.py and test.ini removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
109 lines
3.9 KiB
HTML
109 lines
3.9 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>
|
|
</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>
|
|
<img src="{{ webmention.author_photo }}" alt="{{ webmention.author_name or 'Author' }}" width="48" height="48" loading="lazy">
|
|
</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 %}
|