firebreak/web/app/templates/dashboard.html
2026-05-16 13:54:46 -04:00

89 lines
4.4 KiB
HTML

{% extends "base.html" %}
{% block title %}Dashboard — Myst{% endblock %}
{% block content %}
<div class="flex flex-col gap-6">
<section class="flex flex-col justify-between gap-4 border-b border-border pb-6 sm:flex-row sm:items-end">
<div>
<p class="text-xs font-semibold uppercase tracking-[0.05em] text-primary">Control plane</p>
<h1 class="mt-2 text-3xl font-semibold leading-10 tracking-normal text-text">Dashboard</h1>
<p class="mt-1 text-sm text-text-muted">Welcome, {{ user.display_name or user.email }}.</p>
</div>
<a href="/links/create"
class="w-fit rounded-md bg-primary px-4 py-2.5 text-sm font-medium text-white transition hover:bg-primary-hover focus:ring-2 focus:ring-primary-muted">
Create share link
</a>
</section>
<section class="grid gap-4 md:grid-cols-3">
<div class="rounded-lg border border-border bg-white p-4">
<p class="text-xs font-semibold uppercase tracking-[0.05em] text-text-subtle">Active links</p>
<p class="mt-3 text-2xl font-semibold text-text">0</p>
<p class="mt-1 text-xs text-text-subtle">No repository snapshots published yet.</p>
</div>
<div class="rounded-lg border border-border bg-white p-4">
<p class="text-xs font-semibold uppercase tracking-[0.05em] text-text-subtle">Default expiry</p>
<p class="mt-3 text-2xl font-semibold text-text">7 days</p>
<p class="mt-1 text-xs text-text-subtle">Applied to newly created links.</p>
</div>
<div class="rounded-lg border border-border bg-white p-4">
<p class="text-xs font-semibold uppercase tracking-[0.05em] text-text-subtle">Audit events</p>
<p class="mt-3 text-2xl font-semibold text-text">0</p>
<p class="mt-1 text-xs text-text-subtle">Viewer activity will appear here.</p>
</div>
</section>
<section class="rounded-lg border border-border bg-white">
<div class="border-b border-border px-4 py-4">
<h2 class="text-base font-semibold text-text">Forgejo access token</h2>
<p class="mt-1 text-sm text-text-muted">
Register a <code class="rounded-sm bg-surface-alt px-1.5 py-0.5 text-primary">read:repository</code>-scoped PAT
to enable share link viewing.
</p>
</div>
<form method="post"
class="grid gap-4 px-4 py-4 sm:grid-cols-[1fr_auto] sm:items-end">
<div>
<label for="pat"
class="text-xs font-semibold uppercase tracking-[0.05em] text-text-subtle">
Personal access token
</label>
<input type="text"
id="pat"
name="pat"
class="mt-2 block w-full rounded-md border border-border bg-white px-3 py-2 font-mono text-[13px] leading-5 text-text transition placeholder:text-text-subtle focus:border-primary focus:ring-2 focus:ring-primary-muted"
placeholder="forgejo_pat_..."
required />
</div>
<button type="submit"
class="rounded-md bg-primary px-4 py-2 text-sm font-medium text-white transition hover:bg-primary-hover focus:ring-2 focus:ring-primary-muted">
Register
</button>
</form>
</section>
<section class="rounded-lg border border-border bg-white">
<div class="flex items-center justify-between border-b border-border px-4 py-4">
<div>
<h2 class="text-base font-semibold text-text">Share links</h2>
<p class="mt-1 text-sm text-text-muted">Repository snapshots published from this account.</p>
</div>
<span class="rounded-full bg-surface-alt px-2.5 py-1 text-xs font-medium text-text-subtle">Empty</span>
</div>
<div class="overflow-x-auto">
<table class="w-full min-w-[720px] text-left text-sm">
<thead class="bg-surface-muted text-xs font-semibold uppercase tracking-[0.05em] text-text-subtle">
<tr>
<th class="px-4 py-3">Repository</th>
<th class="px-4 py-3">Commit</th>
<th class="px-4 py-3">Status</th>
<th class="px-4 py-3">Views</th>
<th class="px-4 py-3">Expires</th>
</tr>
</thead>
<tbody class="divide-y divide-border-light">
<tr class="text-text-muted">
<td class="px-4 py-5" colspan="5">You have not created any share links yet.</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
{% endblock %}