Rewrite server: FastAPI + auth (users/roles/tokens) + admin WebUI + server-authoritative covers/metadata
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Dashboard · psppt{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Dashboard</h1>
|
||||
<div class="cards">
|
||||
<div class="stat"><b>{{ users }}</b><span>users</span></div>
|
||||
<div class="stat"><b>{{ downloads }}</b><span>downloads</span></div>
|
||||
<div class="stat"><b>{{ covers }}</b><span>covers</span></div>
|
||||
<div class="stat"><b>{{ store_games }}</b><span>game archives</span></div>
|
||||
<div class="stat"><b>{{ store_videos }}</b><span>video archives</span></div>
|
||||
</div>
|
||||
|
||||
<h2>Catalog</h2>
|
||||
<ul>
|
||||
{% for s in systems %}
|
||||
<li>{{ s.system }} — {{ s.releases }} release(s)</li>
|
||||
{% else %}
|
||||
<li>No catalog data ingested yet.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h2>Recent downloads</h2>
|
||||
<table>
|
||||
<tr><th>When</th><th>User</th><th>System</th><th>Name</th><th>Size</th></tr>
|
||||
{% for r in recent %}
|
||||
<tr>
|
||||
<td>{{ r.created_at }}</td>
|
||||
<td>{{ r.username or '—' }}</td>
|
||||
<td>{{ r.system }}</td>
|
||||
<td>{{ r.name }}</td>
|
||||
<td>{{ (r.bytes / 1048576) | round(1) }} MB</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="5">No downloads yet.</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user