102 lines
3.4 KiB
HTML
102 lines
3.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{{ link.title }} — {{ brand }}</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Sora:wght@400;500;600&display=swap" rel="stylesheet" />
|
|
<link rel="stylesheet" href="/static/css/style.css" />
|
|
</head>
|
|
<body class="panel-body">
|
|
<div class="panel-wrap">
|
|
<header class="panel-header">
|
|
<div>
|
|
<h1>#{{ link.id }} · {{ link.title }}</h1>
|
|
<div class="link-copy-row">
|
|
<button
|
|
type="button"
|
|
class="btn btn-signal btn-copy"
|
|
data-copy="{{ site_base }}/g/{{ link.token }}"
|
|
>Копировать ссылку</button>
|
|
<span class="muted mono link-preview">{{ site_base }}/g/{{ link.token }}</span>
|
|
</div>
|
|
</div>
|
|
<a class="btn btn-ghost" href="/admin">← Назад</a>
|
|
</header>
|
|
|
|
<p class="muted">
|
|
{% if link.link_type == "extend" %}
|
|
Продление: +{{ link.value }} дн. · тариф {{ link.plan_traffic_gb }} ГБ
|
|
{% else %}
|
|
Трафик: +{{ link.value }} ГБ на {{ link.duration_days }} дн. (временный)
|
|
{% endif %}
|
|
· {{ link.used_count }}/{{ link.max_uses }}
|
|
{% if link.note %} · {{ link.note }}{% endif %}
|
|
</p>
|
|
|
|
<div class="table-wrap" style="margin-top:1.5rem;">
|
|
<h2 style="font-family:var(--font-display);font-size:1.1rem;">Активации</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Когда</th>
|
|
<th>Пользователь</th>
|
|
<th>UUID</th>
|
|
<th>Детали</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for claim in claims %}
|
|
<tr>
|
|
<td>{{ claim.claimed_at }}</td>
|
|
<td>{{ claim.username }}</td>
|
|
<td class="mono">{{ claim.user_uuid or "—" }}</td>
|
|
<td>{{ claim.detail }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="4" class="muted">Активаций ещё не было</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{% if link.link_type == "traffic" %}
|
|
<div class="table-wrap" style="margin-top:2rem;">
|
|
<h2 style="font-family:var(--font-display);font-size:1.1rem;">Временный трафик</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Пользователь</th>
|
|
<th>ГБ</th>
|
|
<th>До</th>
|
|
<th>Статус</th>
|
|
<th>Снят</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for g in grants %}
|
|
<tr>
|
|
<td>{{ g.username }}</td>
|
|
<td>+{{ (g.bytes_added / 1073741824)|round(2) }}</td>
|
|
<td>{{ g.expires_at[:19] }}</td>
|
|
<td>{{ g.status }}{% if g.last_error %} <span class="badge badge-off">err</span>{% endif %}</td>
|
|
<td>{{ g.reverted_at[:19] if g.reverted_at else "—" }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="5" class="muted">Выдач ещё не было</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<script src="/static/js/admin.js"></script>
|
|
</body>
|
|
</html>
|