Files
vpn/app/templates/admin/xui_client_detail.html
T

60 lines
2.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "admin/layout.html" %}
{% block admin_title %}{{ client.email }}{% endblock %}
{% block admin_content %}
<div class="admin-top">
<div>
<h1>{{ client.email }}</h1>
<div class="muted">
{{ client.panel.name if client.panel else '3x-ui' }}
· <span class="badge badge-proto">{{ client.protocol }}</span>
{% if client.address %} · {{ client.address }}{% endif %}
{% if client.endpoint %} · {{ client.endpoint }}{% endif %}
</div>
</div>
<div class="actions">
<a class="btn btn-sm btn-ghost" href="/admin/clients">Назад</a>
{% if config %}
<a class="btn btn-sm btn-ghost" href="/admin/clients/xui/{{ client.id }}/config">Скачать .{% if client.protocol == 'wireguard' %}conf{% else %}txt{% endif %}</a>
<a class="btn btn-sm btn-accent" href="/admin/clients/xui/{{ client.id }}/zip">Скачать ZIP</a>
{% endif %}
</div>
</div>
{% if flash %}
{% if flash.startswith('error:') %}
<div class="flash flash-error">{{ flash[6:] }}</div>
{% elif flash == 'created' %}
<div class="flash">Клиент создан — отсканируйте QR или скачайте ZIP</div>
{% endif %}
{% endif %}
{% if not config %}
<div class="flash flash-error">Конфиг ещё не собран. Для VLESS скопируйте ссылку из 3x-ui; для WireGuard пересоздайте клиента.</div>
{% else %}
<div class="detail-grid">
<div class="panel">
<div class="panel-head"><strong>{% if client.protocol == 'wireguard' %}Конфиг WireGuard{% else %}Ссылка{% endif %}</strong></div>
<div class="panel-body">
<pre class="mono">{{ config }}</pre>
</div>
</div>
<div class="panel">
<div class="panel-head"><strong>QR‑код</strong></div>
<div class="panel-body">
<img class="qr" src="/admin/clients/xui/{{ client.id }}/qr" alt="QR config" />
<p class="muted" style="margin-top:0.8rem">
{% if client.protocol == 'wireguard' %}
Отсканируйте в WireGuard / AmneziaWG или скачайте ZIP с `.conf`.
{% else %}
Отсканируйте в клиенте VLESS или скачайте ZIP со ссылкой.
{% endif %}
</p>
{% if client.comment %}
<p><strong>Комментарий:</strong> {{ client.comment }}</p>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endblock %}