feat(webui): bootstrap session handling and login process

This commit is contained in:
Julien Dessaux 2025-01-06 00:41:32 +01:00
parent 63e2b1b09d
commit 6e069484cb
Signed by: adyxax
GPG key ID: F92E51B86E07177E
18 changed files with 447 additions and 1 deletions

29
pkg/webui/html/login.html Normal file
View file

@ -0,0 +1,29 @@
{{ define "main" }}
{{ if .Forbidden }}
<article>
<p class="error-message">Invalid username or password</p>
</article>
{{ end }}
<form action="/login" method="post">
<fieldset>
<label>
Username
<input type="text"
placeholder="Username"
name="username"
value="{{ .Username }}"
{{ if .Forbidden }}aria-invalid="true"{{ end }}
required>
</label>
<label>
Password
<input type="password"
placeholder="Password"
name="password"
{{ if .Forbidden }}aria-invalid="true"{{ end }}
required>
</label>
</fieldset>
<button type="submit" value="login">Login</button>
</form>
{{ end }}