Add FastAPI+htmx review dashboard (port 8092, systemd service)
This commit is contained in:
18
dashboard/templates/_card.html
Normal file
18
dashboard/templates/_card.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% set sha8 = item["sha256"][:8] %}
|
||||
<div class="card" id="card-{{ sha8 }}">
|
||||
{% if item["thumb"] %}
|
||||
<img src="{{ item["thumb"] }}" loading="lazy" alt="">
|
||||
{% else %}
|
||||
<div style="aspect-ratio:1;display:flex;align-items:center;justify-content:center;color:#555;font-size:2rem;">❓</div>
|
||||
{% endif %}
|
||||
<div class="meta">
|
||||
{{ item["path"].split("/")[-1] }}<br>
|
||||
<span class="badge {{ item["status"] }}">{{ item["status"] }}</span>
|
||||
<span style="color:#666"> · {{ item["source"] }}</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button class="approve" hx-post="/review/{{ item["sha256"] }}/approve" hx-target="#card-{{ sha8 }}" hx-swap="outerHTML">✅ Keep</button>
|
||||
<button class="reject" hx-post="/review/{{ item["sha256"] }}/reject" hx-target="#card-{{ sha8 }}" hx-swap="outerHTML">🗑 Reject</button>
|
||||
<button class="reset" hx-post="/review/{{ item["sha256"] }}/reset" hx-target="#card-{{ sha8 }}" hx-swap="outerHTML">↺</button>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user