style: move from "confirm" to "verify" by May's request

This commit is contained in:
Raymond
2025-06-14 16:43:29 -04:00
committed by Azalea
parent 2563a31d15
commit 88d4a3d298
4 changed files with 10 additions and 10 deletions

View File

@@ -79,7 +79,7 @@
<Router {url}> <Router {url}>
<Route path="/" component={Welcome} /> <Route path="/" component={Welcome} />
<Route path="/confirm" component={Welcome} /> <!-- For email confirmation only, backwards compatibility with AquaNet2 in the future --> <Route path="/verify" component={Welcome} /> <!-- For email verification only, backwards compatibility with AquaNet2 in the future -->
<Route path="/home" component={Home} /> <Route path="/home" component={Home} />
<Route path="/ranking" component={Ranking} /> <Route path="/ranking" component={Ranking} />
<Route path="/ranking/:game" component={Ranking} /> <Route path="/ranking/:game" component={Ranking} />

View File

@@ -25,16 +25,16 @@
window.location.href = "/home" window.location.href = "/home"
} }
if (location.pathname !== '/') { if (location.pathname !== '/') {
location.href = `/${params.get('confirm-email') ? `?confirm-email=${params.get('confirm-email')}` : ""}` location.href = `/${params.get('code') ? `?code=${params.get('code')}` : ""}`
} else } else
if (params.get('confirm-email')) { if (params.get('code')) {
state = 'verify' state = 'verify'
verifyMsg = t("welcome.verifying") verifyMsg = t("welcome.verifying")
submitting = true submitting = true
// Send request to server // Send request to server
USER.confirmEmail(params.get('confirm-email')!) USER.confirmEmail(params.get('code')!)
.then(() => { .then(() => {
verifyMsg = t('welcome.verified') verifyMsg = t('welcome.verified')
submitting = false submitting = false

View File

@@ -69,15 +69,15 @@ class EmailService(
confirmationRepo.save(confirmation) confirmationRepo.save(confirmation)
// Send email // Send email
log.info("Sending confirmation email to ${user.email}") log.info("Sending verification email to ${user.email}")
mailer.sendMail(EmailBuilder.startingBlank() mailer.sendMail(EmailBuilder.startingBlank()
.from(props.senderName, props.senderAddr) .from(props.senderName, props.senderAddr)
.to(user.computedName, user.email) .to(user.computedName, user.email)
.withSubject("Confirm Your Email Address for AquaNet") .withSubject("Verification Your Email Address for AquaNet")
.withHTMLText(confirmTemplate .withHTMLText(confirmTemplate
.replace("{{name}}", user.computedName) .replace("{{name}}", user.computedName)
.replace("{{url}}", "https://${props.webHost}/confirm?confirm-email=$token")) .replace("{{url}}", "https://${props.webHost}/verify?code=$token"))
.buildEmail()).thenRun { log.info("Confirmation email sent to ${user.email}") } .buildEmail()).thenRun { log.info("Verification email sent to ${user.email}") }
} }
fun testEmail(addr: Str, name: Str) { fun testEmail(addr: Str, name: Str) {

View File

@@ -212,7 +212,7 @@
<div style="color:#101112;direction:ltr;font-family:'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;font-size:16px;font-weight:400;letter-spacing:0px;line-height:120%;text-align:left;mso-line-height-alt:19.2px;"> <div style="color:#101112;direction:ltr;font-family:'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;font-size:16px;font-weight:400;letter-spacing:0px;line-height:120%;text-align:left;mso-line-height-alt:19.2px;">
<p style="margin: 0; margin-bottom: 16px;">Dear {{name}},</p> <p style="margin: 0; margin-bottom: 16px;">Dear {{name}},</p>
<p style="margin: 0; margin-bottom: 16px;">Thank you for registering with AquaDX! We're excited to have you on board. To complete your registration and verify your email address, please click the link below.</p> <p style="margin: 0; margin-bottom: 16px;">Thank you for registering with AquaDX! We're excited to have you on board. To complete your registration and verify your email address, please click the link below.</p>
<p style="margin: 0;">This link will confirm your email address, and it is valid for 24 hours. If you did not initiate this request, please ignore this email.</p> <p style="margin: 0;">This link will verify your email address, and it is valid for 24 hours. If you did not initiate this request, please ignore this email.</p>
</div> </div>
</td> </td>
</tr> </tr>
@@ -225,7 +225,7 @@
<w:anchorlock/> <w:anchorlock/>
<v:textbox inset="0px,0px,0px,0px"> <v:textbox inset="0px,0px,0px,0px">
<center style="color:#ffffff; font-family:'Trebuchet MS', Tahoma, sans-serif; font-size:16px"> <center style="color:#ffffff; font-family:'Trebuchet MS', Tahoma, sans-serif; font-size:16px">
<![endif]--><a href="{{url}}" style="text-decoration:none;display:inline-block;color:#ffffff;background-color:#646cff;border-radius:8px;width:auto;border-top:0px solid transparent;font-weight:400;border-right:0px solid transparent;border-bottom:0px solid transparent;border-left:0px solid transparent;padding-top:8px;padding-bottom:8px;font-family:'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;font-size:16px;text-align:center;mso-border-alt:none;word-break:keep-all;" target="_blank"><span style="padding-left:16px;padding-right:16px;font-size:16px;display:inline-block;letter-spacing:normal;"><span style="word-break: break-word; line-height: 32px;">Confirm email</span></span></a><!--[if mso]></center></v:textbox></v:roundrect><![endif]--></div> <![endif]--><a href="{{url}}" style="text-decoration:none;display:inline-block;color:#ffffff;background-color:#646cff;border-radius:8px;width:auto;border-top:0px solid transparent;font-weight:400;border-right:0px solid transparent;border-bottom:0px solid transparent;border-left:0px solid transparent;padding-top:8px;padding-bottom:8px;font-family:'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;font-size:16px;text-align:center;mso-border-alt:none;word-break:keep-all;" target="_blank"><span style="padding-left:16px;padding-right:16px;font-size:16px;display:inline-block;letter-spacing:normal;"><span style="word-break: break-word; line-height: 32px;">Verify email</span></span></a><!--[if mso]></center></v:textbox></v:roundrect><![endif]--></div>
</td> </td>
</tr> </tr>
</table> </table>