Authentication
This commit is contained in:
parent
2722c7d40a
commit
a5e3fb2850
19 changed files with 723 additions and 98 deletions
|
|
@ -27,6 +27,7 @@
|
|||
<button type="submit">Search</button>
|
||||
</form>
|
||||
</article>
|
||||
{% if let Some(user) = user %}
|
||||
<article>
|
||||
<h2>Upload media</h2>
|
||||
<form method="post" action="/upload" enctype="multipart/form-data">
|
||||
|
|
@ -51,6 +52,25 @@
|
|||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</article>
|
||||
<article>
|
||||
<a href="/logout">Log out</a>
|
||||
</article>
|
||||
{% else %}
|
||||
<article>
|
||||
<h2>Log in</h2>
|
||||
<form method="post" action="/login">
|
||||
<div>
|
||||
<label>Username</label>
|
||||
<input id="username" type="text" name="username" />
|
||||
</div>
|
||||
<div>
|
||||
<label>Password</label>
|
||||
<input id="password" type="password" name="password" />
|
||||
</div>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</article>
|
||||
{% endif %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue