mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-27 07:06:03 +01:00
Let peers connect to a remote WireGuard endpoint
This commit is contained in:
@@ -140,14 +140,16 @@
|
||||
|
||||
<!-- Row 2: server select (right aligned) -->
|
||||
{% if cluster_settings and servers|length > 1 %}
|
||||
<div class="d-flex w-100 mt-2">
|
||||
<div class="form-inline ml-auto">
|
||||
<label class="mr-2 mb-0" for="server_select">{% trans 'Server' %}:</label>
|
||||
<select class="form-control" id="server_select" style="width: 300px;">
|
||||
{% for server in servers %}
|
||||
<option value="{{ server.uuid }}">{{ server.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="w-100" id="serverSelectRow">
|
||||
<div class="d-flex w-100 mt-2">
|
||||
<div class="form-inline ml-auto">
|
||||
<label class="mr-2 mb-0" for="server_select">{% trans 'Server' %}:</label>
|
||||
<select class="form-control" id="server_select" style="width: 300px;">
|
||||
{% for server in servers %}
|
||||
<option value="{{ server.uuid }}">{{ server.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -108,6 +108,8 @@
|
||||
if (data.name) {
|
||||
$('#peerPreviewModalLabel').text(data.name);
|
||||
}
|
||||
// A peer with an endpoint is a remote server: there is no client configuration to share
|
||||
$('#downloadConfigButton, #qrcodeButton, #inviteButton, #serverSelectRow').toggleClass('d-none', !!data.endpoint);
|
||||
// Check if peer has private_key and enable/disable buttons accordingly
|
||||
if (!data.private_key_exists) {
|
||||
$('#qrcodeButton').addClass('disabled').attr('aria-disabled', 'true');
|
||||
|
||||
Reference in New Issue
Block a user