Add VPN client users with inbound access and subscription links.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{.Title}} · VPN Panel</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=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/static/css/app.css">
|
||||
</head>
|
||||
<body class="page-admin">
|
||||
<aside class="sidebar">
|
||||
<a class="brand" href="/admin">VPN Panel</a>
|
||||
<nav>
|
||||
<a class="{{if eq .Active "dashboard"}}active{{end}}" href="/admin">Обзор</a>
|
||||
<a class="{{if eq .Active "clients"}}active{{end}}" href="/admin/clients">Пользователи</a>
|
||||
<a class="{{if eq .Active "nodes"}}active{{end}}" href="/admin/nodes">Ноды</a>
|
||||
<a class="{{if eq .Active "profiles"}}active{{end}}" href="/admin/profiles">Профили</a>
|
||||
<a class="{{if eq .Active "protocols"}}active{{end}}" href="/admin/protocols">Протоколы</a>
|
||||
</nav>
|
||||
<div class="sidebar-foot">
|
||||
<span class="user-chip">{{.UserName}}</span>
|
||||
<form method="POST" action="/logout"><button type="submit" class="link-btn">Выйти</button></form>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main class="admin-main">
|
||||
<header class="admin-header row-head">
|
||||
<div>
|
||||
<h1>Пользователи</h1>
|
||||
<p class="muted">VPN-клиенты: доступ к инбаундам и subscription-ссылка</p>
|
||||
</div>
|
||||
<a class="btn btn-primary" href="/admin/clients/new">+ Создать пользователя</a>
|
||||
</header>
|
||||
|
||||
{{if .Flash}}<div class="alert ok">{{.Flash}}</div>{{end}}
|
||||
{{if .Error}}<div class="alert">{{.Error}}</div>{{end}}
|
||||
|
||||
{{if .Clients}}
|
||||
<div class="table-wrap">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<th>Статус</th>
|
||||
<th>Инбаунды</th>
|
||||
<th>Лимит</th>
|
||||
<th>Истекает</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Clients}}
|
||||
<tr>
|
||||
<td>
|
||||
<strong><a href="/admin/clients/{{.ID}}">{{.Username}}</a></strong>
|
||||
{{if .Email}}<div class="cell-desc">{{.Email}}</div>{{end}}
|
||||
</td>
|
||||
<td><span class="badge {{statusClass (printf "%s" .Status)}}">{{.StatusLabel}}</span></td>
|
||||
<td>{{.InboundCount}}</td>
|
||||
<td>{{if gt .TrafficLimitBytes 0}}{{printf "%.1f" .TrafficLimitGB}} GB{{else}}∞{{end}}</td>
|
||||
<td>{{if .ExpireAt}}{{.ExpireAt.Format "02.01.2006 15:04"}}{{else}}—{{end}}</td>
|
||||
<td class="actions"><a class="btn btn-sm btn-ghost" href="/admin/clients/{{.ID}}">Открыть</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="empty-state">
|
||||
<p>Пользователей пока нет.</p>
|
||||
<a class="btn btn-primary" href="/admin/clients/new">Создать первого</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user