more wireguard ui polishing

master
Alice 4 years ago
parent 0d8c37c18f
commit 7fc4204960

@ -422,6 +422,15 @@ def wireguard(request):
def wireguard_new(request): def wireguard_new(request):
if not request.user.vpnuser.is_paid: if not request.user.vpnuser.is_paid:
return redirect('account:index') return redirect('account:index')
try:
keys = django_lcore.api.get_wg_peers(request.user.username)
except lcoreapi.APINotFoundError:
django_lcore.sync_user(request.user.vpnuser)
keys = []
if len(keys) >= int(site_config.WIREGUARD_MAX_PEERS):
return redirect('/account/wireguard')
api = django_lcore.api api = django_lcore.api
if request.method == 'POST': if request.method == 'POST':
action = request.POST.get('action') action = request.POST.get('action')

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-27 18:32+0000\n" "POT-Creation-Date: 2020-07-15 22:27+0000\n"
"PO-Revision-Date: 2016-04-07 01:32+0000\n" "PO-Revision-Date: 2016-04-07 01:32+0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -35,39 +35,39 @@ msgstr "Chat Live"
msgid "Download {} v{}" msgid "Download {} v{}"
msgstr "Télécharger {} v{}" msgstr "Télécharger {} v{}"
#: lambdainst/admin.py:25 #: lambdainst/admin.py:26
msgid "Code must be [a-zA-Z0-9]" msgid "Code must be [a-zA-Z0-9]"
msgstr "" msgstr ""
#: lambdainst/admin.py:27 #: lambdainst/admin.py:28
msgid "Code must be between 1 and 32 characters" msgid "Code must be between 1 and 32 characters"
msgstr "" msgstr ""
#: lambdainst/admin.py:46 #: lambdainst/admin.py:47
msgid "(rewarded)" msgid "(rewarded)"
msgstr "" msgstr ""
#: lambdainst/admin.py:48 #: lambdainst/admin.py:49
msgid "(not rewarded)" msgid "(not rewarded)"
msgstr "" msgstr ""
#: lambdainst/admin.py:51 #: lambdainst/admin.py:52
msgid "Referrer" msgid "Referrer"
msgstr "" msgstr ""
#: lambdainst/admin.py:56 lambdainst/admin.py:100 #: lambdainst/admin.py:57 lambdainst/admin.py:99
msgid "Is paid?" msgid "Is paid?"
msgstr "Est payé?" msgstr "Est payé?"
#: lambdainst/admin.py:90 #: lambdainst/admin.py:89
msgid "Important dates" msgid "Important dates"
msgstr "Dates importantes" msgstr "Dates importantes"
#: lambdainst/admin.py:91 #: lambdainst/admin.py:90
msgid "Permissions" msgid "Permissions"
msgstr "Permissions" msgstr "Permissions"
#: lambdainst/admin.py:139 tickets/admin.py:44 #: lambdainst/admin.py:138 tickets/admin.py:44
msgid "Comment" msgid "Comment"
msgstr "Notes" msgstr "Notes"
@ -213,50 +213,50 @@ msgstr ""
msgid "%s Pbps" msgid "%s Pbps"
msgstr "" msgstr ""
#: lambdainst/views.py:156 #: lambdainst/views.py:155
msgid "Awesome VPN! 3€ per month, with a free 7 days trial!" msgid "Awesome VPN! 3€ per month, with a free 7 days trial!"
msgstr "" msgstr ""
#: lambdainst/views.py:172 templates/account_layout.html:10 #: lambdainst/views.py:171 templates/account_layout.html:10
#: templates/lambdainst/account.html:17 #: templates/lambdainst/account.html:17
msgid "Account" msgid "Account"
msgstr "Compte" msgstr "Compte"
#: lambdainst/views.py:217 lambdainst/views.py:237 lambdainst/views.py:262 #: lambdainst/views.py:216 lambdainst/views.py:236 lambdainst/views.py:261
msgid "OK!" msgid "OK!"
msgstr "OK!" msgstr "OK!"
#: lambdainst/views.py:219 #: lambdainst/views.py:218
msgid "Invalid captcha" msgid "Invalid captcha"
msgstr "Captcha invalide" msgstr "Captcha invalide"
#: lambdainst/views.py:233 #: lambdainst/views.py:232
msgid "Passwords do not match" msgid "Passwords do not match"
msgstr "Les mots de passe ne correspondent pas" msgstr "Les mots de passe ne correspondent pas"
#: lambdainst/views.py:247 templates/account_layout.html:28 #: lambdainst/views.py:246 templates/account_layout.html:28
#: templates/lambdainst/settings.html:6 #: templates/lambdainst/settings.html:6
msgid "Settings" msgid "Settings"
msgstr "Options" msgstr "Options"
#: lambdainst/views.py:258 #: lambdainst/views.py:257
msgid "Gift code not found or already used." msgid "Gift code not found or already used."
msgstr "Code inconnu ou déjà utilisé." msgstr "Code inconnu ou déjà utilisé."
#: lambdainst/views.py:260 #: lambdainst/views.py:259
msgid "Gift code only available to free accounts." msgid "Gift code only available to free accounts."
msgstr "Code uniquement disponible pour les nouveaux comptes." msgstr "Code uniquement disponible pour les nouveaux comptes."
#: lambdainst/views.py:288 templates/account_layout.html:36 #: lambdainst/views.py:287 templates/account_layout.html:36
#: templates/lambdainst/logs.html:6 #: templates/lambdainst/logs.html:6
msgid "Logs" msgid "Logs"
msgstr "Logs" msgstr "Logs"
#: lambdainst/views.py:295 templates/lambdainst/config.html:7 #: lambdainst/views.py:294 templates/lambdainst/config.html:7
msgid "Config" msgid "Config"
msgstr "Config" msgstr "Config"
#: lambdainst/views.py:319 payments/backends/bitcoin.py:90 #: lambdainst/views.py:322 payments/backends/bitcoin.py:90
#: payments/backends/bitcoin.py:92 templates/admin/index.html:53 #: payments/backends/bitcoin.py:92 templates/admin/index.html:53
#: templates/admin/index.html:56 templates/lambdainst/admin_ref.html:16 #: templates/admin/index.html:56 templates/lambdainst/admin_ref.html:16
#: templates/lambdainst/admin_status.html:16 templates/payments/list.html:13 #: templates/lambdainst/admin_status.html:16 templates/payments/list.html:13
@ -425,13 +425,13 @@ msgstr ""
msgid "Overview" msgid "Overview"
msgstr "Vue d'ensemble" msgstr "Vue d'ensemble"
#: templates/account_layout.html:18 #: templates/account_layout.html:18 templates/ccvpn/index.html:41
msgid "OpenVPN Config" msgid "OpenVPN"
msgstr "Config OpenVPN" msgstr "OpenVPN"
#: templates/account_layout.html:23 #: templates/account_layout.html:23
msgid "WireGuard" msgid "WireGuard"
msgstr "" msgstr "WireGuard"
#: templates/account_layout.html:32 templates/payments/list.html:6 #: templates/account_layout.html:32 templates/payments/list.html:6
msgid "Payments" msgid "Payments"
@ -571,21 +571,21 @@ msgstr "avec une <b>adresse anonyme</b>."
msgid "Supports DNSSEC and PFS." msgid "Supports DNSSEC and PFS."
msgstr "Avec du DNSSEC et PFS." msgstr "Avec du DNSSEC et PFS."
#: templates/ccvpn/index.html:41
msgid "OpenVPN"
msgstr "OpenVPN"
#: templates/ccvpn/index.html:54 #: templates/ccvpn/index.html:54
msgid "Fast" msgid "Fast"
msgstr "Rapide" msgstr "Rapide"
#: templates/ccvpn/index.html:55
msgid "Up to 1Gbps."
msgstr "Jusqu'à 1Gbps."
#: templates/ccvpn/index.html:56 #: templates/ccvpn/index.html:56
msgid "Compressed tunnel." msgid "With WireGuard compatibility"
msgstr "Tunnel compressé." msgstr "Compatible avec WireGuard"
#: templates/ccvpn/index.html:57 #: templates/ccvpn/index.html:57
msgid "Even on YouTube." msgid "for the best performances."
msgstr "Même sur YouTube." msgstr "pour de meilleures performances."
#: templates/ccvpn/index.html:66 #: templates/ccvpn/index.html:66
msgid "Sign up and get your free trial" msgid "Sign up and get your free trial"
@ -849,7 +849,6 @@ msgid "Gateway"
msgstr "Serveur" msgstr "Serveur"
#: templates/lambdainst/config.html:22 #: templates/lambdainst/config.html:22
#: templates/lambdainst/wireguard_peer.html:26
msgid "Random" msgid "Random"
msgstr "Aléatoire" msgstr "Aléatoire"
@ -857,7 +856,7 @@ msgstr "Aléatoire"
msgid "All (multiple config files)" msgid "All (multiple config files)"
msgstr "Tous (plusieurs fichiers)" msgstr "Tous (plusieurs fichiers)"
#: templates/lambdainst/config.html:26 #: templates/lambdainst/config.html:26 templates/lambdainst/wireguard.html:97
msgid "Country" msgid "Country"
msgstr "Pays" msgstr "Pays"
@ -885,8 +884,7 @@ msgstr "Dans le doute, laissez vide."
msgid "Requires TCP." msgid "Requires TCP."
msgstr "Nécéssite TCP." msgstr "Nécéssite TCP."
#: templates/lambdainst/config.html:56 #: templates/lambdainst/config.html:56 templates/lambdainst/wireguard.html:127
#: templates/lambdainst/wireguard_new.html:38
msgid "Enable IPv6?" msgid "Enable IPv6?"
msgstr "Activer l'IPv6?" msgstr "Activer l'IPv6?"
@ -947,7 +945,7 @@ msgid "repeat"
msgstr "répétez" msgstr "répétez"
#: templates/lambdainst/settings.html:27 #: templates/lambdainst/settings.html:27
#: templates/lambdainst/wireguard.html:158 #: templates/lambdainst/wireguard.html:239
msgid "Save" msgid "Save"
msgstr "Enregistrer" msgstr "Enregistrer"
@ -1003,60 +1001,89 @@ msgstr "Serveurs"
#: templates/lambdainst/wireguard.html:10 #: templates/lambdainst/wireguard.html:10
msgid "" msgid ""
"This page lets you manage WireGuard peers. Each can only have one concurrent " "This page lets you manage <a href=\"https://www.wireguard.com/\">WireGuard</"
"connection." "a> clients. Each can only have one concurrent connection."
msgstr "" msgstr ""
"Gérez vos appareils et clés WireGuard. Chaque clé permet une connexion " "Gérez vos appareils et clés <a href=\"https://www.wireguard.com/"
"simultanée." "\">WireGuard</a>. Chaque clé permet une connexion simultanée."
#: templates/lambdainst/wireguard.html:18 #: templates/lambdainst/wireguard.html:15
msgid ""
"WireGuard has better performances than OpenVPN, but is not as widely "
"supported."
msgstr ""
"WireGuard a de meilleurs performances qu'OpenVPN, mais n'est pas aussi "
"couramment compatible."
#: templates/lambdainst/wireguard.html:22
msgid "Your Devices" msgid "Your Devices"
msgstr "Vos appareils" msgstr "Vos appareils"
#: templates/lambdainst/wireguard.html:23 #: templates/lambdainst/wireguard.html:34
#: templates/lambdainst/wireguard_new.html:5 #: templates/lambdainst/wireguard_new.html:5
#: templates/lambdainst/wireguard_new.html:7 #: templates/lambdainst/wireguard_new.html:7
msgid "New Device" msgid "New Device"
msgstr "Nouvel appareil" msgstr "Nouvel appareil"
#: templates/lambdainst/wireguard.html:32 #: templates/lambdainst/wireguard.html:44
msgid "Key" #: templates/lambdainst/wireguard_new.html:25
msgstr "Clé" msgid "Public Key"
msgstr "Clé publique"
#: templates/lambdainst/wireguard.html:33 #: templates/lambdainst/wireguard.html:45
#: templates/lambdainst/wireguard_new.html:15 #: templates/lambdainst/wireguard_new.html:15
#: templates/lambdainst/wireguard_new.html:17 #: templates/lambdainst/wireguard_new.html:17
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
#: templates/lambdainst/wireguard.html:34 #: templates/lambdainst/wireguard.html:58
msgid "Actions"
msgstr "Actions"
#: templates/lambdainst/wireguard.html:46
msgid "Download"
msgstr "Télécharger"
#: templates/lambdainst/wireguard.html:51
msgid "Show QR Code"
msgstr "Afficher le code QR"
#: templates/lambdainst/wireguard.html:56
msgid "Edit" msgid "Edit"
msgstr "Éditer" msgstr "Éditer"
#: templates/lambdainst/wireguard.html:65 #: templates/lambdainst/wireguard.html:67
msgid "Delete" msgid "Delete"
msgstr "Supprimer" msgstr "Supprimer"
#: templates/lambdainst/wireguard.html:80
msgid "Device"
msgstr "Appareil"
#: templates/lambdainst/wireguard.html:95
msgid "Server"
msgstr "Serveur"
#: templates/lambdainst/wireguard.html:107
msgid "All (zip archive)"
msgstr "Tous (en tant qu'archive zip)"
#: templates/lambdainst/wireguard.html:112
msgid "Server Port"
msgstr "Port Serveur"
#: templates/lambdainst/wireguard.html:114
msgid "(WireGuard default)"
msgstr "(WireGuard par défaut)"
#: templates/lambdainst/wireguard.html:115
msgid "(standard DNS port)"
msgstr "(port standard DNS)"
#: templates/lambdainst/wireguard.html:116
msgid "(standard HTTP port)"
msgstr "(port standard HTTP)"
#: templates/lambdainst/wireguard.html:117
msgid "(standard HTTPS port)"
msgstr "(port standard HTTPS)"
#: templates/lambdainst/wireguard.html:120
msgid "You can try an alternative server port if 51820 is blocked."
msgstr "Essayez un port alternatif si 51820 est bloqué pour vous."
#: templates/lambdainst/wireguard_new.html:20 #: templates/lambdainst/wireguard_new.html:20
msgid "Used to identify the device in your account." msgid "Used to identify the device in your account."
msgstr "Utilisé pour l'identifier dans votre compte." msgstr "Utilisé pour l'identifier dans votre compte."
#: templates/lambdainst/wireguard_new.html:25
msgid "Public Key"
msgstr "Clé publique"
#: templates/lambdainst/wireguard_new.html:27 #: templates/lambdainst/wireguard_new.html:27
msgid "Public key (base64)" msgid "Public key (base64)"
msgstr "Clé publique (base64)" msgstr "Clé publique (base64)"
@ -1065,7 +1092,7 @@ msgstr "Clé publique (base64)"
msgid "Use an existing public key. Leave empty to generate a new one." msgid "Use an existing public key. Leave empty to generate a new one."
msgstr "Pour générer votre propre clé privée. Laissez vide sinon." msgstr "Pour générer votre propre clé privée. Laissez vide sinon."
#: templates/lambdainst/wireguard_new.html:42 #: templates/lambdainst/wireguard_new.html:37
msgid "Create Key" msgid "Create Key"
msgstr "Ajouter" msgstr "Ajouter"
@ -1369,3 +1396,9 @@ msgstr "Peut envoyer des messages privés"
#: tickets/models.py:55 #: tickets/models.py:55
msgid "Waiting for staff" msgid "Waiting for staff"
msgstr "En attente du support" msgstr "En attente du support"
#~ msgid "Compressed tunnel."
#~ msgstr "Tunnel compressé."
#~ msgid "Even on YouTube."
#~ msgstr "Même sur YouTube."

@ -15,7 +15,7 @@
</a></li> </a></li>
<li><a href="/account/config"> <li><a href="/account/config">
<i class="fa fa-download fa-fw" aria-hidden="true"></i>&nbsp; <i class="fa fa-download fa-fw" aria-hidden="true"></i>&nbsp;
{% trans 'OpenVPN Config' %} {% trans 'OpenVPN' %}
</a></li> </a></li>
{% if config.WIREGUARD %} {% if config.WIREGUARD %}
<li><a href="/account/wireguard"> <li><a href="/account/wireguard">

@ -52,9 +52,9 @@
<img src="{% static 'img/fast.svg' %}" alt="" /> <img src="{% static 'img/fast.svg' %}" alt="" />
<div class="home-item-content"> <div class="home-item-content">
<h2>{% trans 'Fast' %}</h2> <h2>{% trans 'Fast' %}</h2>
<p><b>1Gbps</b><br/> <p>{% trans 'Up to 1Gbps.' %}<br/>
<b>{% trans 'Compressed tunnel.' %}</b><br /> <b>{% trans 'With WireGuard compatibility' %}</b>
{% trans 'Even on YouTube.' %} {% trans 'for the best performances.' %}
</p> </p>
</div> </div>
</div> </div>

@ -8,9 +8,13 @@
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
This page lets you manage WireGuard peers. This page lets you manage <a href="https://www.wireguard.com/">WireGuard</a> clients.
Each can only have one concurrent connection. Each can only have one concurrent connection.
{% endblocktrans %} {% endblocktrans %}
<br />
{% blocktrans trimmed %}
WireGuard has better performances than OpenVPN, but is not as widely supported.
{% endblocktrans %}
</p> </p>
<div class="page-wg-title"> <div class="page-wg-title">
@ -18,8 +22,14 @@
{% trans "Your Devices" %} <span>{{ keys|length }}/{{ config.WIREGUARD_MAX_PEERS }}</span> {% trans "Your Devices" %} <span>{{ keys|length }}/{{ config.WIREGUARD_MAX_PEERS }}</span>
</h3> </h3>
<p> <p>
<a href="{% url 'lambdainst:wireguard_new' %}" class="pure-button pure-button-primary" <a
{% if not can_create_key %}disabled{% endif %} {% if not can_create_key %}
href="#"
disabled
{% else %}
href="{% url 'lambdainst:wireguard_new' %}"
{% endif %}
class="pure-button pure-button-primary"
> >
{% trans "New Device" %} {% trans "New Device" %}
</a> </a>
@ -31,7 +41,7 @@
<table class="pure-table pure-table-bordered page-wg-table"> <table class="pure-table pure-table-bordered page-wg-table">
<thead> <thead>
<tr> <tr>
<td>{% trans "Key" %}</td> <td>{% trans "Public Key" %}</td>
<td>{% trans "Name" %}</td> <td>{% trans "Name" %}</td>
<td colspan="2"></td> <td colspan="2"></td>
</tr> </tr>

@ -3,7 +3,7 @@ Title: Support
--- ---
### Installation Guides ### OpenVPN Installation Guides
<ul class="install-guides"> <ul class="install-guides">
<li><a href="/page/install-android"><i class="fa fa-android fa-5x"></i> Android</a></li> <li><a href="/page/install-android"><i class="fa fa-android fa-5x"></i> Android</a></li>

@ -2,7 +2,7 @@
Title: Guides Title: Guides
--- ---
### Installation ### Installation d'OpenVPN
<ul class="install-guides"> <ul class="install-guides">
<li><a href="/page/install-android"><i class="fa fa-android fa-5x"></i> Android</a></li> <li><a href="/page/install-android"><i class="fa fa-android fa-5x"></i> Android</a></li>

Loading…
Cancel
Save