MatrixGW/templates/index.html

108 lines
4.6 KiB
HTML
Raw Normal View History

2025-01-22 20:56:35 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Matrix GW</title>
2025-01-22 21:09:45 +01:00
<link rel="icon" type="image/png" href="/assets/favicon.png"/>
<link rel="stylesheet" href="/assets/bootstrap.css"/>
2025-01-22 21:35:38 +01:00
<link rel="stylesheet" href="/assets/style.css"/>
2025-01-22 20:56:35 +01:00
</head>
<body>
2025-01-22 21:09:45 +01:00
<!-- Header -->
<header data-bs-theme="dark">
<div class="navbar navbar-dark bg-dark shadow-sm">
<div class="container">
<a href="#" class="navbar-brand d-flex align-items-center">
<svg xxmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor"
stroke-linecap="round" stroke-linejoin="round" stroke-width="1" aria-hidden="true" class="me-2"
viewBox="0 0 24 24">
<path d="M10 11.5H17V13H10V11.5M10 8.5H19V10H10V8.5M20 5H9C7.9 5 7 5.9 7 7V21L11 17H20C21.1 17 22 16.1 22 15V7C22 5.9 21.1 5 20 5M20 15H10.2L9 16.2V7H20V15M3 7C2.4 7 2 7.4 2 8S2.4 9 3 9H5V7H3M2 11C1.4 11 1 11.4 1 12S1.4 13 2 13H5V11H2M1 15C.4 15 0 15.4 0 16C0 16.6 .4 17 1 17H5V15H1Z"/>
</svg>
<strong>Matrix GW</strong>
</a>
<div class="navbar">
<span>Hi <span style="font-style: italic;">{{ name }}</span>&nbsp;&nbsp;</span>
2025-01-22 21:35:38 +01:00
<a href="/sign_out">Sign out</a>
2025-01-22 21:09:45 +01:00
</div>
</div>
</div>
</header>
2025-01-22 21:35:38 +01:00
<div class="body-content">
2025-01-23 21:28:33 +01:00
<!-- Success message -->
{% if let Some(msg) = success_message %}
<div class="alert alert-success">
{{ msg }}
</div>
{% endif %}
<!-- Error message -->
{% if let Some(msg) = error_message %}
<div class="alert alert-danger">
{{ msg }}
</div>
{% endif %}
2025-01-27 21:31:33 +01:00
<!-- New client -->
<div class="card border-light mb-3">
<div class="card-header">New client</div>
<div class="card-body">
<form action="/" method="post">
<div>
<label for="new_client_desc" class="form-label">Description</label>
<input type="text" class="form-control" id="new_client_desc" required minlength="3"
aria-describedby="new_client_desc" placeholder="New client description..." name="new_client_desc" />
<small class="form-text text-muted">Client description helps with identification.</small>
</div>
<div>
<label for="ip_network" class="form-label">Allowed IP network</label>
<input type="text" class="form-control" id="ip_network" aria-describedby="ip_network"
placeholder="Client network (x.x.x.x/x or x:x:x:x:x:x/x" name="ip_network" />
<small class="form-text text-muted">Restrict the networks this IP address can be used from.</small>
</div>
<input type="submit" class="btn btn-primary" value="Create client"/>
</form>
</div>
</div>
2025-01-22 21:35:38 +01:00
<!-- Matrix authentication token -->
<div class="card border-light mb-3">
<div class="card-header">Matrix authentication token</div>
<div class="card-body">
<p>To obtain a new Matrix authentication token:</p>
<ol>
<li>Sign in to Element <strong>from a private browser window</strong></li>
<li>Open <em>All settings</em> and access the <em>Help &amp; About</em> tag</li>
<li>Expand <em>Access Token</em> and copy the value</li>
<li>Paste the copied value below</li>
<li>Close the private browser window <strong>without signing out</strong>!</li>
</ol>
<p>You should not need to replace this value unless you explicitly signed out the associated browser
session.</p>
<p>Tip: you can rename the session to easily identify it among all your other sessions!</p>
2025-01-23 21:28:33 +01:00
<form action="/" method="post">
2025-01-22 21:35:38 +01:00
<div>
<label for="accessTokenInput" class="form-label mt-4">New Matrix access token</label>
<input type="text" class="form-control" id="accessTokenInput" aria-describedby="tokenHelp"
2025-01-23 21:28:33 +01:00
placeholder="{{ matrix_token }}" required minlength="2" name="new_matrix_token"/>
2025-01-22 21:35:38 +01:00
<small id="tokenHelp" class="form-text text-muted">Changing this value will reset all active
connections
2025-01-22 21:36:09 +01:00
to Matrix GW.</small>
2025-01-22 21:35:38 +01:00
</div>
<input type="submit" class="btn btn-primary" value="Update"/>
</form>
</div>
</div>
</div>
2025-01-22 20:56:35 +01:00
</body>
</html>