Files
alembic/app/templates/dashboard.html
T
andrew b4dd2286a9 Restructure Settings nav, modernize import page, dedup/genres UX polish
Settings is now one top-nav entry with Credentials and Jobs as sidebar
sub-pages (jobs moved from /jobs to /settings/jobs). Manual import page
replaces the bare file input and free-text filename field with a drag-drop
dropzone and a proper file-picker table. Genres page drops the "force"
checkbox for two explicit buttons (Preview / Fix genres now). Dedup's
"Scan now" runs both the file-naming and acoustic passes together, and the
table labels which pass caught each candidate instead of showing the raw
pass name. .btn-ghost gets a visible border so it reads as a real button
next to Delete/Danger actions instead of looking unaligned. Job names
throughout the UI are now human-readable instead of raw job_key strings.

Also includes the fpcalc exit-code fix from earlier (fingerprint index
was discarding valid fingerprints on files with a benign decode warning).
2026-07-09 10:26:40 -06:00

92 lines
3.5 KiB
HTML

{% extends "base.html" %}
{% block title %}Dashboard — alembic{% endblock %}
{% block content %}
<div class="page-header">
<div>
<h1>Welcome back, {{ user.name or user.email }}</h1>
<p class="subtitle muted">Distilling Spotify playlists into a tuned, tagged library.</p>
</div>
<div class="actions">
<a class="btn btn-primary" href="/playlists">Manage playlists</a>
</div>
</div>
<div class="stat-grid">
<div class="stat-card">
<div class="stat-value chrome-text">{{ stats.total_tracks }}</div>
<div class="stat-label">Tracks in library{% if not stats.db_exists %} <span class="muted">(beets db not found)</span>{% endif %}</div>
</div>
<div class="stat-card">
<div class="stat-value">{{ active_playlist_count }}<span class="muted"> / {{ playlist_count }}</span></div>
<div class="stat-label">Playlists active</div>
</div>
<div class="stat-card">
<div class="stat-value">{{ stats.groupings | length }}</div>
<div class="stat-label">Distinct groupings</div>
</div>
<div class="stat-card">
<div class="stat-value">{{ total_size_human }}</div>
<div class="stat-label">Approx. library size</div>
</div>
</div>
<h2>File formats</h2>
{% if stats.formats %}
<ul class="chip-list">
{% for f in stats.formats %}
<li>{{ f.format }} <span class="muted">&times; {{ f.count }}</span></li>
{% endfor %}
</ul>
{% else %}
<p class="muted">No format data yet.</p>
{% endif %}
<h2>Credential status</h2>
<ul class="chip-list auth-chip-list">
{% for a in auth_states %}
<li title="{{ a.scope }}: {{ 'configured' if a.configured else 'not configured' }}{% if a.days_left is defined %}, cookie expires in {{ a.days_left }}d{% endif %}"><span class="status-dot {{ 'status-dot-success' if a.configured else 'status-dot-muted' }}{% if a.days_left is defined and a.days_left < 14 %} status-dot-warning{% endif %}"></span>{{ a.scope }}{% if a.days_left is defined %}<span class="muted"> {{ a.days_left }}d</span>{% endif %}</li>
{% endfor %}
</ul>
<p><a href="/settings/credentials">Manage credentials &rarr;</a></p>
<h2>Downloaded in the last 24 hours</h2>
<div class="table-wrap scroll">
<table>
<thead><tr><th>Artist</th><th>Title</th><th>Playlist</th><th>Format</th></tr></thead>
<tbody>
{% for t in recent_tracks %}
<tr>
<td>{{ t.artist }}</td>
<td>{{ t.title }}</td>
<td class="muted">{{ t.grouping }}</td>
<td><span class="badge badge-muted">{{ t.format }}</span></td>
</tr>
{% else %}
<tr class="empty-row"><td colspan="4" class="muted">Nothing downloaded in the last 24 hours.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
<h2>Recent job runs</h2>
<div class="table-wrap scroll">
<table>
<thead><tr><th>Job</th><th>Status</th><th>Triggered by</th><th>Summary</th></tr></thead>
<tbody>
{% set status_badge = {"running": "badge-info badge-pulse", "success": "badge-success", "failed": "badge-danger", "skipped_lock": "badge-muted"} %}
{% for run in recent_runs %}
<tr>
<td>{{ humanize_job_key(run.job_key) }}</td>
<td><span class="badge {{ status_badge.get(run.status, 'badge-muted') }}">{{ run.status }}</span></td>
<td class="muted">{{ run.triggered_by }}</td>
<td>{{ run.summary or "—" }}</td>
</tr>
{% else %}
<tr class="empty-row"><td colspan="4" class="muted">No job runs yet.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
<p><a href="/settings/jobs">See all jobs &rarr;</a></p>
{% endblock %}