feat(auth): #154 send verification mails
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package auth
|
||||
|
||||
templ SignInOrUp(isSignIn bool) {
|
||||
templ SignInOrUpComp(isSignIn bool) {
|
||||
<form
|
||||
class="max-w-xl px-2 mx-auto flex flex-col gap-4 h-full justify-center"
|
||||
hx-target="#sign-in-or-up-error"
|
||||
|
||||
20
template/auth/verify.templ
Normal file
20
template/auth/verify.templ
Normal file
@@ -0,0 +1,20 @@
|
||||
package auth
|
||||
|
||||
templ VerifyComp() {
|
||||
<main>
|
||||
<div class="flex flex-col items-center justify-center h-screen">
|
||||
<h2 class="text-6xl mb-10">
|
||||
Verify your email
|
||||
</h2>
|
||||
<p class="text-lg text-center">
|
||||
We have sent you an email with a link to verify your account.
|
||||
</p>
|
||||
<p class="text-lg text-center">
|
||||
Please check your inbox/spam and click on the link to verify your account.
|
||||
</p>
|
||||
<button class="btn mt-8" hx-get="/api/auth/verify-resend" hx-sync="this:drop" hx-swap="outerHTML">
|
||||
resend verification email
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
}
|
||||
19
template/mail/register.templ
Normal file
19
template/mail/register.templ
Normal file
@@ -0,0 +1,19 @@
|
||||
package mail;
|
||||
|
||||
import "me-fit/utils"
|
||||
|
||||
templ Register(mailCode string) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Welcome</title>
|
||||
</head>
|
||||
<body>
|
||||
<h4>Thank you for Sign Up!</h4>
|
||||
<p>Click <a href={ templ.URL(utils.BaseUrl + "/auth/verify-email?code=" + mailCode) }>here</a> to verify your account.</p>
|
||||
<p>Kind regards</p>
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
Reference in New Issue
Block a user