2020-10-18 07:10:13 +02:00
< html >
2021-05-04 07:32:34 +02:00
{% include "header.html" %}
2020-10-18 07:10:13 +02:00
< body >
2021-05-04 07:32:34 +02:00
{% include "navbar.html" %}
2020-10-18 07:10:13 +02:00
< div class = "container-fluid" >
2021-05-04 07:32:34 +02:00
{% include "sidebar.html" %}
2021-05-14 00:00:40 +02:00
< main role = "main" class = "col-md-9 ml-sm-auto col-lg-10 px-md-4 mb-4" >
2021-05-05 03:26:40 +02:00
< h1 class = "pb-4 mt-4" > Home< / h1 >
2021-07-02 19:23:04 +02:00
{% if conf == [] %}
< p class = "text-muted" > You don't have any WireGuard configurations yet. Please check the configuration folder or change it in "Settings". By default the folder is "/etc/wireguard".< / p >
{% endif %}
2020-10-18 07:10:13 +02:00
{% for i in conf%}
< div class = "card mt-3" >
< div class = "card-body" >
2020-10-18 07:52:53 +02:00
< div class = "row" >
2021-05-04 07:32:34 +02:00
< div class = "col card-col" >
2020-10-23 07:31:10 +02:00
< small class = "text-muted" > < strong > CONFIGURATION< / strong > < / small >
2020-10-18 18:23:38 +02:00
< a href = "/configuration/{{i['conf']}}" >
2021-05-04 07:32:34 +02:00
< h6 class = "card-title" style = "margin:0 !important;" > {{i['conf']}}< / h6 >
2020-10-18 18:23:38 +02:00
< / a >
< / div >
2021-05-04 07:32:34 +02:00
< div class = "col card-col" >
2020-10-18 07:52:53 +02:00
< small class = "text-muted" > < strong > STATUS< / strong > < / small >
2021-05-04 07:32:34 +02:00
< h6 style = "text-transform: uppercase; margin:0 !important;" > {{i['status']}}< span class = "dot dot-{{i['status']}}" > < / span > < / h6 >
2020-10-18 07:52:53 +02:00
< / div >
2021-05-04 07:32:34 +02:00
< div class = "col-md card-col" >
2020-10-18 07:52:53 +02:00
< small class = "text-muted" > < strong > PUBLIC KEY< / strong > < / small >
2021-05-04 07:32:34 +02:00
< h6 style = "text-transform: uppercase; margin:0 !important;" > < samp > {{i['public_key']}}< / samp > < / h6 >
< / div >
2021-05-14 00:00:40 +02:00
< div class = "col-md index-switch" >
2021-05-04 07:32:34 +02:00
{% if i['checked'] == "checked" %}
2021-05-05 03:26:40 +02:00
< a href = "#" id = "{{i['conf']}}" { { i [ ' checked ' ] } } class = "switch text-primary tt" > < i class = "bi bi-toggle2-on" > < / i > < / a >
2021-05-04 07:32:34 +02:00
{% else %}
< a href = "#" id = "{{i['conf']}}" { { i [ ' checked ' ] } } class = "switch text-secondary" > < i class = "bi bi-toggle2-off" > < / i > < / a >
{% endif %}
2021-05-05 03:26:40 +02:00
< div class = "spinner-border text-primary" role = "status" style = "display: none" >
< span class = "sr-only" > Loading...< / span >
< / div >
2020-10-18 07:52:53 +02:00
< / div >
< / div >
2020-10-18 07:10:13 +02:00
< / div >
< / div >
{%endfor%}
< / main >
< / div >
2021-05-14 00:00:40 +02:00
{% include "tools.html" %}
2020-10-18 07:10:13 +02:00
< / body >
2021-05-04 07:32:34 +02:00
{% include "footer.html" %}
2020-10-18 07:10:13 +02:00
< script >
2021-05-04 07:32:34 +02:00
$('.switch').click(function() {
2021-05-05 03:26:40 +02:00
$(this).siblings($(".spinner-border")).css("display", "inline-block")
$(this).remove()
2021-05-04 07:32:34 +02:00
location.replace("/switch/"+$(this).attr('id'))
2020-10-23 07:31:10 +02:00
});
2021-05-04 07:32:34 +02:00
$(".sb-home-url").addClass("active")
2020-10-18 07:10:13 +02:00
< / script >
< / html >