feat(auth): change password user self service #171
All checks were successful
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 58s
All checks were successful
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 58s
This commit is contained in:
22
template/auth/change_password.templ
Normal file
22
template/auth/change_password.templ
Normal file
@@ -0,0 +1,22 @@
|
||||
package auth
|
||||
|
||||
templ ChangePasswordComp() {
|
||||
<form
|
||||
class="max-w-xl px-2 mx-auto flex flex-col gap-4 h-full justify-center"
|
||||
hx-post="/api/auth/change-password"
|
||||
hx-swap="none"
|
||||
>
|
||||
<h2 class="text-6xl mb-10">
|
||||
Change Password
|
||||
</h2>
|
||||
<label class="input input-bordered flex items-center gap-2">
|
||||
<input type="password" class="grow" placeholder="Current Password" name="current-password"/>
|
||||
</label>
|
||||
<label class="input input-bordered flex items-center gap-2">
|
||||
<input type="password" class="grow" placeholder="New Password" name="new-password"/>
|
||||
</label>
|
||||
<button class="btn btn-primary self-end">
|
||||
Change Password
|
||||
</button>
|
||||
</form>
|
||||
}
|
||||
@@ -23,6 +23,9 @@ templ UserComp(user string) {
|
||||
<li class="mb-1">
|
||||
<a hx-get="/api/auth/signout" hx-target="#user-info">Sign Out</a>
|
||||
</li>
|
||||
<li class="mb-1">
|
||||
<a href="/auth/change-password">Change Password</a>
|
||||
</li>
|
||||
<li><a href="/auth/delete-account" class="text-error">Delete Account</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user