70 lines
3.1 KiB
HTML
70 lines
3.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Dashboard — Firebreak{% endblock %}
|
|
{% block content %}
|
|
<div class="flex flex-col gap-6">
|
|
<section class="flex flex-col justify-between gap-4 pb-6 border-b border-border sm:flex-row sm:items-end">
|
|
<div>
|
|
<h1 class="mt-2 text-3xl font-semibold leading-10 tracking-normal">Welcome,</h1>
|
|
<p class=" text-2xl text-muted-foreground">{{ user.display_name or user.email }}.</p>
|
|
</div>
|
|
{% if pat_registered %}
|
|
<a href="/links/create" class="btn btn-primary w-fit">Create share link</a>
|
|
{% else %}
|
|
<span class="btn btn-primary w-fit opacity-50 pointer-events-none"
|
|
aria-disabled="true">Create share link</span>
|
|
{% endif %}
|
|
</section>
|
|
<section class="grid gap-4 md:grid-cols-3">
|
|
<div class="p-4 card">
|
|
<p class="section-header-subtle">Active links</p>
|
|
<p class="mt-3 text-2xl font-semibold text-foreground">0</p>
|
|
<p class="mt-2 text-xs text-muted-foreground">No repository snapshots published yet.</p>
|
|
</div>
|
|
<div class="p-4 card">
|
|
<p class="section-header-subtle">Default expiry</p>
|
|
<p class="mt-3 text-2xl font-semibold text-foreground">7 days</p>
|
|
<p class="mt-2 text-xs text-muted-foreground">Applied to newly created links.</p>
|
|
</div>
|
|
<div class="p-4 card">
|
|
<p class="section-header-subtle">Audit events</p>
|
|
<p class="mt-3 text-2xl font-semibold text-foreground">0</p>
|
|
<p class="mt-2 text-xs text-muted-foreground">Viewer activity will appear here.</p>
|
|
</div>
|
|
</section>
|
|
{% if not pat_registered %}
|
|
<div class="rounded-lg border border-warning-muted bg-warning-muted/40 px-5 py-4">
|
|
<p class="text-sm font-semibold text-warning-foreground">Access token required</p>
|
|
<p class="mt-1 text-sm text-muted-foreground">
|
|
Register a Forgejo access token to create share links.
|
|
</p>
|
|
<a href="/settings" class="btn btn-sm btn-primary mt-3 w-fit">Go to Settings</a>
|
|
</div>
|
|
{% endif %}
|
|
<div class="space-y-3">
|
|
<div>
|
|
<h2 class="text-base font-semibold">Share links</h2>
|
|
<p class="mt-2 text-sm text-muted-foreground">Repository snapshots published from this account.</p>
|
|
</div>
|
|
<section class="card">
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full min-w-[720px] text-left text-sm">
|
|
<thead class="bg-muted text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground">
|
|
<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-subtle">
|
|
<tr class="text-muted-foreground text-center">
|
|
<td class="px-4 py-5" colspan="5">You have not created any share links yet.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|