aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/templates/sent_source.html
diff options
context:
space:
mode:
authorDennis Fink2026-08-16 20:51:26 +0200
committerDennis Fink2026-08-16 20:51:26 +0200
commit85a73c811a3de333138978d8d450533caa668dc5 (patch)
tree6b8b855484c14a7934922d91d4bfd7ececd099eb /webmentions_ssg/templates/sent_source.html
parent58a4a8ee06bcf23c3957af5c2ea035b6797c4395 (diff)
downloadwebmentions-ssg-85a73c811a3de333138978d8d450533caa668dc5.tar.gz
webmentions-ssg-85a73c811a3de333138978d8d450533caa668dc5.zip
feat(sender): improve sent webmention status display
Highlight source and Webmention rows based on their current state and use badges for clearer status and activity indicators. Make discovered endpoints and status URLs clickable in the detail view.
Diffstat (limited to 'webmentions_ssg/templates/sent_source.html')
-rw-r--r--webmentions_ssg/templates/sent_source.html63
1 files changed, 42 insertions, 21 deletions
diff --git a/webmentions_ssg/templates/sent_source.html b/webmentions_ssg/templates/sent_source.html
index 6d397f2..8e5932c 100644
--- a/webmentions_ssg/templates/sent_source.html
+++ b/webmentions_ssg/templates/sent_source.html
@@ -77,54 +77,75 @@
<th scope="col">Endpoint</th>
<th scope="col">Response Status</th>
<th scope="col">Status URL</th>
- <th scope="col">Last Attempted at</th>
- <th scope="col">Last Sent at</th>
+ <th scope="col">Last attempted at</th>
+ <th scope="col">Last sent at</th>
</tr>
</thead>
<tbody>
{% for webmention in webmentions %}
- <tr>
+ {% if webmention.status.value == "sent" %}
+ {% set row_class = "table-success" %}
+ {% set badge_class = "text-bg-success" %}
+ {% elif webmention.status.value == "unsupported" %}
+ {% set row_class = "table-warning" %}
+ {% set badge_class = "text-bg-warning" %}
+ {% elif webmention.status.value == "failed" %}
+ {% set row_class = "table-danger" %}
+ {% set badge_class = "text-bg-danger" %}
+ {% else %}
+ {% set row_class = "table-info" %}
+ {% set badge_class = "text-bg-info" %}
+ {% endif %}
+ <tr class="{{ row_class }}">
<td class="text-break">
<a href="{{ webmention.target }}">{{ webmention.target }}</a>
</td>
- <td>{{ webmention.status.value }}</td>
+ <td>
+ {% if webmention.status is not none %}
+ <span class="badge {{ badge_class }}">{{ webmention.status.value.title() }}</span>
+ {% endif %}
+ </td>
<td>
{% if webmention.active %}
<span class="badge text-bg-success">Active</span>
{% else %}
- <span class="badge text-bg-secondary">Removed</span>
+ <span class="badge text-bg-danger">Removed</span>
{% endif %}
</td>
<td>{{ webmention.desired_revision }}</td>
<td>
{{ webmention.processed_revision
- if webmention.processed_revision is not none
- else "—" }}
+ if webmention.processed_revision is not none
+ else "—" }}
</td>
<td>
{{ webmention.sent_revision
- if webmention.sent_revision is not none
- else "—" }}
+ if webmention.sent_revision is not none
+ else "—" }}
</td>
<td>
{{ webmention.failure_reason
- if webmention.failure_reason is not none
- else "—" }}
+ if webmention.failure_reason is not none
+ else "—" }}
</td>
- <td>
- {{ webmention.endpoint
- if webmention.endpoint is not none
- else "—" }}
+ <td class="text-break">
+ {% if webmention.endpoint is not none %}
+ <a href="{{ webmention.endpoint }}">{{ webmention.endpoint }}</a>
+ {% else %}
+ —
+ {% endif %}
</td>
<td>
{{ webmention.response_status
- if webmention.response_status is not none
- else "—" }}
+ if webmention.response_status is not none
+ else "—" }}
</td>
- <td>
- {{ webmention.status_url
- if webmention.status_url is not none
- else "—" }}
+ <td class="text-break">
+ {% if webmention.status_url is not none %}
+ <a href="{{ webmention.status_url }}">{{ webmention.status_url }}</a>
+ {% else %}
+ —
+ {% endif %}
</td>
<td>
{% if webmention.last_attempted_at is not none %}