erm
This commit is contained in:
@@ -1,65 +1,56 @@
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<style type="text/css">
|
||||
.tg {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.tg td {
|
||||
border-color: black;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
padding: 10px 5px;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.tg th {
|
||||
border-color: black;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
overflow: hidden;
|
||||
padding: 10px 5px;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.tg .tg-0lax {
|
||||
text-align: left;
|
||||
vertical-align: top
|
||||
}
|
||||
</style>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Travel Router</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
Travel Router:
|
||||
<a href="{{ url_for('index') }}">Home</a>
|
||||
{% if not current_user.is_anonymous %}
|
||||
<a href="{{ url_for('logout') }}">Logout</a>
|
||||
{% if vpn %}
|
||||
<a href="{{ url_for('vpndisconnect') }}">Disconnect from VPN</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('vpnconnect') }}">Connect to VPN</a>
|
||||
{% endif %}
|
||||
{% if killswitch %}
|
||||
<a href="{{ url_for('ksdisable') }}">Disable KillSwitch</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('ksenable') }}">Enable KillSwitch</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{{ url_for('index') }}">Travel Router</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('index') }}">Home</a>
|
||||
</li>
|
||||
{% if not current_user.is_anonymous %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('logout') }}">Logout</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
{% if vpn %}
|
||||
<a class="nav-link" href="{{ url_for('vpndisconnect') }}">Disconnect from VPN</a>
|
||||
{% else %}
|
||||
<a class="nav-link" href="{{ url_for('vpnconnect') }}">Connect to VPN</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
{% if killswitch %}
|
||||
<a class="nav-link" href="{{ url_for('ksdisable') }}">Disable KillSwitch</a>
|
||||
{% else %}
|
||||
<a class="nav-link" href="{{ url_for('ksenable') }}">Enable KillSwitch</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<hr>
|
||||
{% block content %}{% endblock %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -2,15 +2,17 @@
|
||||
|
||||
{% block content %}
|
||||
<h1>Networks</h1>
|
||||
<table class="tg">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tg-0lax">SSID</th>
|
||||
<th class="tg-0lax">Quality</th>
|
||||
<th class="tg-0lax">Connected</th>
|
||||
<th class="tg-0lax">Security</th>
|
||||
<th class="tg-0lax">Action</th>
|
||||
<th scope="col">SSID</th>
|
||||
<th scope="col">Quality</th>
|
||||
<th scope="col">Connected</th>
|
||||
<th scope="col">Security</th>
|
||||
<th scope="col">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%- for row in networks %}
|
||||
<tr>
|
||||
<td> {{ row['SSID'] }} </td>
|
||||
@@ -19,14 +21,13 @@
|
||||
<td> {{ row['WPA'] }} </td>
|
||||
|
||||
{% if row["Connected"] == "Yes" %}
|
||||
<!-- {{ "User is logged in" if loggedin else "User is not logged in" }} -->
|
||||
<td><a href={{"/disconnect/" + row["SSID"] }}>Disconnect</a></td>
|
||||
<td><a href={{"/disconnect/" + row["SSID"] }} class="btn btn-secondary">Disconnect</a></td>
|
||||
{% else %}
|
||||
<td><a href={{"/connect/" + row["SSID"] + "&" + row["WPA"]}}>Connect</a></td>
|
||||
<td><a href={{"/connect/" + row["SSID"] + "&" + row["WPA"]}} class="btn btn-primary">Connect</a></td>
|
||||
{% endif %}
|
||||
|
||||
</tr>
|
||||
{%- endfor %}
|
||||
</thead>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
@@ -3,20 +3,20 @@
|
||||
<h1>Sign In</h1>
|
||||
<form action="" method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.username.label }}<br>
|
||||
{{ form.username(size=32) }}<br>
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">{{ form.username.label }}</label>
|
||||
<input type="text" class="form-control" id="username" name="username" size="32">
|
||||
{% for error in form.username.errors %}
|
||||
<span style="color: red;">[{{ error }}]</span>
|
||||
<div class="invalid-feedback">{{ error }}</div>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
{{ form.password(size=32) }}<br>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">{{ form.password.label }}</label>
|
||||
<input type="password" class="form-control" id="password" name="password" size="32">
|
||||
{% for error in form.password.errors %}
|
||||
<span style="color: red;">[{{ error }}]</span>
|
||||
<div class="invalid-feedback">{{ error }}</div>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">{{ form.submit.label }}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,5 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{message}}</h2>
|
||||
<div class="alert alert-info" role="alert">
|
||||
{{message}}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -3,14 +3,17 @@
|
||||
<h1>Password</h1>
|
||||
<form action="" method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
{{ form.password(size=32) }}<br>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">{{ form.password.label }}</label>
|
||||
<input type="password" class="form-control" id="password" name="password" size="32">
|
||||
{% for error in form.password.errors %}
|
||||
<span style="color: red;">[{{ error }}]</span>
|
||||
<div class="invalid-feedback">{{ error }}</div>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.remember() }} {{ form.remember.label }}</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</div>
|
||||
<div class="mb-3 form-check">
|
||||
<input type="checkbox" class="form-check-input" id="remember" name="remember">
|
||||
<label class="form-check-label" for="remember">{{ form.remember.label }}</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">{{ form.submit.label }}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user