CI / Check (push) Successful in 5m59s
Pages polled `/api/version` every three seconds, then fetched the pending list and replaced it, or reloaded a request's page. Now each page follows one stream from `/events`, whose `morph` events carry a region of the page: the pending list, or the request, as a whole element with its `id`, rendered by the page's own templates. The page script morphs it into the page with idiomorph, vendored, so open details, the focus and typing stay. The stream starts with the current region, so a page catches up when the browser reconnects, and it ends when the approver signs out. `/api/version` and `/pending` are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
573 B
HTML
18 lines
573 B
HTML
{%- import "macros.html" as m -%}
|
|
<div id="pending">
|
|
{% if entries.is_empty() %}
|
|
<p class="empty">Nothing is waiting for an answer.</p>
|
|
{% endif %}
|
|
{% for entry in entries %}
|
|
{% call m::card(entry, csrf, false) %}{% endcall %}
|
|
{% endfor %}
|
|
{% if !leases.is_empty() %}
|
|
<h2>Active leases</h2>
|
|
<table><thead><tr><th>Requester</th><th>Scope</th><th>Left</th></tr></thead><tbody>
|
|
{% for (requester, scope, seconds) in leases %}
|
|
<tr><td>{{ requester }}</td><td><code>{{ scope }}</code></td><td>{{ self::left(seconds) }}</td></tr>
|
|
{% endfor %}
|
|
</tbody></table>
|
|
{% endif %}
|
|
</div>
|