finished login/registration

This commit is contained in:
2026-01-24 13:13:22 +11:00
parent ff0f61f534
commit c780050f8e
13 changed files with 164 additions and 92 deletions

View File

@@ -4,13 +4,7 @@ import "git.haelnorr.com/h/oslstats/internal/view/layout"
import "git.haelnorr.com/h/oslstats/internal/view/component/form"
// Returns the login page
templ Register(username string, unique bool) {
{{
err := ""
if !unique {
err = "Username is taken"
}
}}
templ Register(username string) {
@layout.Global("Register") {
<div class="max-w-100 mx-auto px-2">
<div class="mt-7 bg-mantle border border-surface1 rounded-xl">
@@ -26,7 +20,7 @@ templ Register(username string, unique bool) {
</p>
</div>
<div class="mt-5">
@form.RegisterForm(username, err)
@form.RegisterForm(username)
</div>
</div>
</div>