diff options
| author | Dennis Fink | 2026-08-21 11:08:53 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-08-21 11:08:53 +0200 |
| commit | 66ad7fefff6edc1d993f5c347430a28d63727988 (patch) | |
| tree | 3fd2d66d0505628480692d5c8ad86131c657be83 /webmentions_ssg/templates/sent_source.html | |
| parent | b07b61a354b32637acf84cec2c5b4f8019cb94b7 (diff) | |
| download | webmentions-ssg-66ad7fefff6edc1d993f5c347430a28d63727988.tar.gz webmentions-ssg-66ad7fefff6edc1d993f5c347430a28d63727988.zip | |
feat(sender): add manual Webmention resend action
Add an authenticated action to reopen a sent Webmention revision and
queue it for delivery again from the source detail view.
Clear the previous attempt state while preserving historical
successful-send data, and show pending Webmentions explicitly in the UI.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/templates/sent_source.html | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/webmentions_ssg/templates/sent_source.html b/webmentions_ssg/templates/sent_source.html index 6bb2ac5..77376b5 100644 --- a/webmentions_ssg/templates/sent_source.html +++ b/webmentions_ssg/templates/sent_source.html @@ -3,7 +3,6 @@ SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me> SPDX-License-Identifier: BSD-3-Clause --> - {% extends "base.html" %} {% block content %} <div class="mb-3"> @@ -85,11 +84,15 @@ SPDX-License-Identifier: BSD-3-Clause <th scope="col">Status URL</th> <th scope="col">Last attempted at</th> <th scope="col">Last sent at</th> + <th scope="col">Actions</th> </tr> </thead> <tbody> {% for webmention in webmentions %} - {% if webmention.status.value == "sent" %} + {% if webmention.status is none %} + {% set row_class = "table-info" %} + {% set badge_class = "text-bg-info" %} + {% elif webmention.status.value == "sent" %} {% set row_class = "table-success" %} {% set badge_class = "text-bg-success" %} {% elif webmention.status.value == "unsupported" %} @@ -107,7 +110,9 @@ SPDX-License-Identifier: BSD-3-Clause <a href="{{ webmention.target }}">{{ webmention.target }}</a> </td> <td> - {% if webmention.status is not none %} + {% if webmention.status is none %} + <span class="badge {{ badge_class }}">Pending</span> + {% else %} <span class="badge {{ badge_class }}">{{ webmention.status.value.title() }}</span> {% endif %} </td> @@ -171,12 +176,28 @@ SPDX-License-Identifier: BSD-3-Clause — {% endif %} </td> + <td> + <button type="button" + class="btn btn-sm btn-primary" + data-bs-toggle="modal" + data-bs-target="#confirmation-modal" + data-action="{{ url_for("root.resend_sent_webmention", source_identifier=source.uuid, webmention_identifier=webmention.uuid) }}" + data-title="Resend Webmention?" + data-message="This Webmention will be queued again for delivery to {{ webmention.target }}." + data-confirm-label="Resend" + data-confirm-class="btn-primary">Resend</button> + </td> </tr> {% endfor %} </tbody> </table> </div> + {% include "includes/confirmation_modal.html" %} {% else %} <p class="text-body-secondary">No Webmentions have been discovered for this source.</p> {% endif %} {% endblock %} +{% block scripts %} + {{ super() }} + <script src="{{ url_for('static', filename='js/confirmation-modal.js') }}"></script> +{% endblock %} |
