2020-10-18 01:10:13 -04:00
< html >
2021-08-14 23:30:05 -04:00
{% with %}
{% set title="Home" %}
{% include "header.html"%}
{% endwith %}
2020-10-18 01:10:13 -04:00
< body >
2021-05-04 01:32:34 -04:00
{% include "navbar.html" %}
2020-10-18 01:10:13 -04:00
< div class = "container-fluid" >
2021-05-04 01:32:34 -04:00
{% include "sidebar.html" %}
2021-05-13 18:00:40 -04:00
< main role = "main" class = "col-md-9 ml-sm-auto col-lg-10 px-md-4 mb-4" >
2021-05-04 21:26:40 -04:00
< h1 class = "pb-4 mt-4" > Home</ h1 >
2021-07-02 13:23:04 -04: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 01:10:13 -04:00
{% for i in conf%}
2021-12-29 12:17:44 -05:00
< div class = "card mt-3 conf_card" >
2020-10-18 01:10:13 -04:00
< div class = "card-body" >
2020-10-18 01:52:53 -04:00
< div class = "row" >
2021-05-04 01:32:34 -04:00
< div class = "col card-col" >
2020-10-23 01:31:10 -04:00
< small class = "text-muted" >< strong > CONFIGURATION</ strong ></ small >
2021-12-29 12:17:44 -05:00
< a href = "/configuration/{{i['conf']}}" class = "conf_link" >
2021-05-04 01:32:34 -04:00
< h6 class = "card-title" style = "margin:0 !important;" > {{i['conf']}}</ h6 >
2020-10-18 12:23:38 -04:00
</ a >
</ div >
2021-05-04 01:32:34 -04:00
< div class = "col card-col" >
2020-10-18 01:52:53 -04:00
< small class = "text-muted" >< strong > STATUS</ strong ></ small >
2021-05-04 01:32:34 -04:00
< h6 style = "text-transform: uppercase; margin:0 !important;" > {{i['status']}}< span class = "dot dot-{{i['status']}}" ></ span ></ h6 >
2020-10-18 01:52:53 -04:00
</ div >
2021-05-04 01:32:34 -04:00
< div class = "col-md card-col" >
2020-10-18 01:52:53 -04:00
< small class = "text-muted" >< strong > PUBLIC KEY</ strong ></ small >
2021-05-04 01:32:34 -04:00
< h6 style = "text-transform: uppercase; margin:0 !important;" >< samp > {{i['public_key']}}</ samp ></ h6 >
</ div >
2021-05-13 18:00:40 -04:00
< div class = "col-md index-switch" >
2021-05-04 01:32:34 -04:00
{% if i['checked'] == "checked" %}
2021-05-04 21:26:40 -04:00
< a href = "#" id = "{{i['conf']}}" {{ i [' checked ']}} class = "switch text-primary tt" >< i class = "bi bi-toggle2-on" ></ i ></ a >
2021-05-04 01:32:34 -04:00
{% else %}
< a href = "#" id = "{{i['conf']}}" {{ i [' checked ']}} class = "switch text-secondary" >< i class = "bi bi-toggle2-off" ></ i ></ a >
{% endif %}
2021-05-04 21:26:40 -04:00
< div class = "spinner-border text-primary" role = "status" style = "display: none" >
< span class = "sr-only" > Loading...</ span >
</ div >
2020-10-18 01:52:53 -04:00
</ div >
</ div >
2020-10-18 01:10:13 -04:00
</ div >
</ div >
{%endfor%}
</ main >
</ div >
2021-05-13 18:00:40 -04:00
{% include "tools.html" %}
2020-10-18 01:10:13 -04:00
</ body >
2021-05-04 01:32:34 -04:00
{% include "footer.html" %}
2020-10-18 01:10:13 -04:00
< script >
2021-12-29 12:17:44 -05:00
$ ( '.switch' ). on ( "click" , function () {
2021-05-04 21:26:40 -04:00
$ ( this ). siblings ( $ ( ".spinner-border" )). css ( "display" , "inline-block" )
$ ( this ). remove ()
2021-05-04 01:32:34 -04:00
location . replace ( "/switch/" + $ ( this ). attr ( 'id' ))
2020-10-23 01:31:10 -04:00
});
2021-12-29 12:17:44 -05:00
$ ( ".sb-home-url" ). addClass ( "active" );
$ ( ".card-body" ). on ( "click" , function ( handle ){
if ( $ ( handle . target ). attr ( "class" ) !== "bi bi-toggle2-off" && $ ( handle . target ). attr ( "class" ) !== "bi bi-toggle2-on" ) {
window . open ( $ ( this ). find ( "a" ). attr ( "href" ), "_self" );
}
})
2020-10-18 01:10:13 -04:00
</ script >
</ html >