chore: Recover v1.6.0-rc.2 source from production image
The v1.6.0 work (webmentions, reply contexts, rate limiter, migration 010) was built and deployed as git.thesatelliteoflove.com/phil/starpunk:v1.6.0-rc.2 but never committed. This restores the application code from /app in the running container so later work builds on what production runs. Tests and docs for v1.6.0 were not in the image and are not recovered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
06a8aabc01
commit
d3fa5b7a2a
24 files changed
+3982
-78
No files matched your search
@@ -10,6 +10,14 @@
|
||||
<a href="{{ url_for('admin.new_note_form') }}" class="button button-primary">
|
||||
+ New Note
|
||||
</a>
|
||||
{% if config.WEBMENTION_ENABLED %}
|
||||
<a href="{{ url_for('admin.webmentions') }}" class="button">
|
||||
Webmentions
|
||||
{% if webmention_pending_count > 0 %}
|
||||
<span class="badge">{{ webmention_pending_count }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if notes %}
|
||||
@@ -59,6 +67,20 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{# Pagination (v1.6.0) #}
|
||||
{% if total_pages > 1 %}
|
||||
<nav class="pagination">
|
||||
{% if page > 1 %}
|
||||
<a href="?page={{ page - 1 }}" class="button">Previous</a>
|
||||
{% endif %}
|
||||
<span>Page {{ page }} of {{ total_pages }}</span>
|
||||
{% if page < total_pages %}
|
||||
<a href="?page={{ page + 1 }}" class="button">Next</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<div class="empty-state">
|
||||
<p>No notes yet. Create your first note!</p>
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
{% 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="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="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="action" value="delete">
|
||||
<button type="submit" class="button button-danger" onclick="return confirm('Delete this webmention permanently?')">
|
||||
Delete
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,125 @@
|
||||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block title %}Webmentions - StarPunk Admin{% endblock %}
|
||||
|
||||
{% block admin_content %}
|
||||
<div class="webmentions-admin">
|
||||
<h2>Webmentions</h2>
|
||||
|
||||
<div class="dashboard-actions">
|
||||
<a href="{{ url_for('admin.dashboard') }}" class="button">
|
||||
Back to Dashboard
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{# Filter tabs #}
|
||||
<div class="filter-tabs">
|
||||
<a href="{{ url_for('admin.webmentions') }}" class="{% if not status_filter %}active{% endif %}">
|
||||
All
|
||||
</a>
|
||||
<a href="{{ url_for('admin.webmentions', status='pending') }}" class="{% if status_filter == 'pending' %}active{% endif %}">
|
||||
Pending
|
||||
</a>
|
||||
<a href="{{ url_for('admin.webmentions', status='approved') }}" class="{% if status_filter == 'approved' %}active{% endif %}">
|
||||
Approved
|
||||
</a>
|
||||
<a href="{{ url_for('admin.webmentions', status='hidden') }}" class="{% if status_filter == 'hidden' %}active{% endif %}">
|
||||
Hidden
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% if webmentions %}
|
||||
<form method="POST" action="{{ url_for('admin.webmention_bulk_action') }}">
|
||||
<div class="bulk-actions">
|
||||
<button type="submit" name="action" value="approve" class="button">
|
||||
Approve Selected
|
||||
</button>
|
||||
<button type="submit" name="action" value="hide" class="button">
|
||||
Hide Selected
|
||||
</button>
|
||||
<button type="submit" name="action" value="delete" class="button button-danger"
|
||||
onclick="return confirm('Delete selected webmentions permanently?')">
|
||||
Delete Selected
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table class="webmention-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="select-all"></th>
|
||||
<th>Source</th>
|
||||
<th>Target</th>
|
||||
<th>Type</th>
|
||||
<th>Author</th>
|
||||
<th>Status</th>
|
||||
<th>Received</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for wm in webmentions %}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids" value="{{ wm.id }}"></td>
|
||||
<td><a href="{{ wm.source_url }}" target="_blank">{{ wm.source_url|truncate(40) }}</a></td>
|
||||
<td>
|
||||
{% if wm.target_note_id %}
|
||||
<a href="{{ url_for('public.note', slug=wm.target_slug) }}">{{ wm.target_slug }}</a>
|
||||
{% else %}
|
||||
Homepage
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><span class="badge badge-{{ wm.mention_type }}">{{ wm.mention_type }}</span></td>
|
||||
<td>{{ wm.author_name or 'Anonymous' }}</td>
|
||||
<td>
|
||||
<span class="status-badge status-{{ wm.moderation_status }}">
|
||||
{{ wm.moderation_status }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ wm.received_at.strftime('%b %d, %Y %H:%M') }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('admin.webmention_detail', id=wm.id) }}" class="button button-small">
|
||||
View
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{# Pagination #}
|
||||
{% if total_pages > 1 %}
|
||||
<nav class="pagination">
|
||||
{% if page > 1 %}
|
||||
<a href="?page={{ page - 1 }}{% if status_filter %}&status={{ status_filter }}{% endif %}" class="button">Previous</a>
|
||||
{% endif %}
|
||||
<span>Page {{ page }} of {{ total_pages }}</span>
|
||||
{% if page < total_pages %}
|
||||
<a href="?page={{ page + 1 }}{% if status_filter %}&status={{ status_filter }}{% endif %}" class="button">Next</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{# Empty states #}
|
||||
{% if status_filter %}
|
||||
<div class="empty-state">
|
||||
<p>No webmentions match the current filters.</p>
|
||||
<a href="{{ url_for('admin.webmentions') }}" class="button">Clear Filters</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state">
|
||||
<p>No webmentions received yet.</p>
|
||||
<p class="text-muted">They will appear here when other sites mention your content.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Select All functionality
|
||||
document.getElementById('select-all')?.addEventListener('change', function() {
|
||||
document.querySelectorAll('input[name="ids"]').forEach(cb => cb.checked = this.checked);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user