add user dashboard
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Dashboard - IZBI DNS</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Hello {{ username }} <a href="/logout">log out</a></h2>
|
||||
|
||||
{% with messages = get_flashed_messages()%}
|
||||
{% if messages%}
|
||||
{% for message in messages%}
|
||||
<h3>{{message}}</h3>
|
||||
{%endfor%}
|
||||
{%endif%}
|
||||
{%endwith%}
|
||||
|
||||
<p>Your domains:
|
||||
<ul>{% for domain in domains %}
|
||||
<li>{{ domain }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>Your tokens:
|
||||
<form method="POST" action="/generate-token">
|
||||
<input type="text" name="token" placeholder="token name" />
|
||||
<button type="submit">new token</button>
|
||||
</form>
|
||||
<ul>{% for token in tokens %}
|
||||
<li>
|
||||
<form method="POST" action="/revoke-token">
|
||||
<input type="text" name="token" readonly value="{{ token }}" />
|
||||
<button type="submit">revoke</button>
|
||||
</form>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>Password change
|
||||
<form method="POST" action="/change-password">
|
||||
<input type="password" name="pass" placeholder="old password" /><br />
|
||||
<input type="password" name="pass-new" placeholder="new password" /><br />
|
||||
<input type="password" name="pass-rep" placeholder="repeat password" /><br />
|
||||
<button type="submit">change password</button>
|
||||
</form>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,9 +7,9 @@
|
||||
<p>Dynamic DNS service for <span style="font-family: monospace">.izbi</span> domains <span style="font-family: monospace">:3</span></p>
|
||||
|
||||
<form method="POST" action="/login">
|
||||
<input type="text" name="user" placeholder="username" required /><br />
|
||||
<input type="text" name="user" placeholder="username" required autofocus /><br />
|
||||
<input type="password" name="pass" placeholder="password" required /><br />
|
||||
<button type="submit">Log in</button>
|
||||
<button type="submit">log in</button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user