Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/controllers/Auth.scala
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ final class Auth(
.send(user, storedEmail)
.inject:
Redirect:
routes.Auth.passwordResetSent(storedEmail.conceal)
routes.Auth.passwordResetSent(storedEmail.value)
case _ =>
lila.mon.user.auth.passwordResetRequest("noEmail").increment()
Redirect(routes.Auth.passwordResetSent(data.email.conceal))
Redirect(routes.Auth.passwordResetSent(data.email.value))
}
)
else renderPasswordReset(none, fail = true).map { BadRequest(_) }
Expand Down
3 changes: 3 additions & 0 deletions modules/coreI18n/src/main/key.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1972,6 +1972,9 @@ object I18nKey:
val `checkYourEmail`: I18nKey = "checkYourEmail"
val `weHaveSentYouAnEmailClickTheLink`: I18nKey = "weHaveSentYouAnEmailClickTheLink"
val `ifYouDoNotSeeTheEmailCheckOtherPlaces`: I18nKey = "ifYouDoNotSeeTheEmailCheckOtherPlaces"
val `ifYouDoNotGetTheEmail`: I18nKey = "ifYouDoNotGetTheEmail"
val `checkAllEmailFolders`: I18nKey = "checkAllEmailFolders"
val `verifyYourAddress`: I18nKey = "verifyYourAddress"
val `weHaveSentYouAnEmailTo`: I18nKey = "weHaveSentYouAnEmailTo"
val `byRegisteringYouAgreeToBeBoundByOur`: I18nKey = "byRegisteringYouAgreeToBeBoundByOur"
val `readAboutOur`: I18nKey = "readAboutOur"
Expand Down
8 changes: 6 additions & 2 deletions modules/web/src/main/ui/AuthUi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,15 @@ final class AuthUi(helpers: Helpers):
)

def passwordResetSent(email: String)(using Context) =
Page(trans.site.passwordReset.txt()):
Page(trans.site.passwordReset.txt()).css("bits.auth"):
main(cls := "page-small box box-pad")(
boxTop(h1(cls := "is-green text", dataIcon := Icon.Checkmark)(trans.site.checkYourEmail())),
p(trans.site.weHaveSentYouAnEmailTo(email)),
p(trans.site.ifYouDoNotSeeTheEmailCheckOtherPlaces())
p(trans.site.ifYouDoNotGetTheEmail()),
ul(cls := "checklist")(
li(trans.site.checkAllEmailFolders()),
li(trans.site.verifyYourAddress(email))
)
)

def passwordResetConfirm(token: String, form: Form[?], ok: Option[Boolean] = None)(using
Expand Down
3 changes: 3 additions & 0 deletions translation/source/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,9 @@
<string name="checkYourEmail">Check your Email</string>
<string name="weHaveSentYouAnEmailClickTheLink">We've sent you an email. Click the link in the email to activate your account.</string>
<string name="ifYouDoNotSeeTheEmailCheckOtherPlaces">If you don't see the email, check other places it might be, like your junk, spam, social, or other folders.</string>
<string name="ifYouDoNotGetTheEmail">If you do not get the email within 5 minutes:</string>
<string name="checkAllEmailFolders">Check all junk, spam, and other folders</string>
<string name="verifyYourAddress">Verify that %s is your email address</string>
<string name="weHaveSentYouAnEmailTo">We've sent an email to %s. Click the link in the email to reset your password.</string>
<string name="byRegisteringYouAgreeToBeBoundByOur">By registering, you agree to the %s.</string>
<string name="readAboutOur">Read about our %s.</string>
Expand Down
6 changes: 6 additions & 0 deletions ui/@types/lichess/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2919,6 +2919,8 @@ interface I18n {
cheat: string;
/** Cheat Detected */
cheatDetected: string;
/** Check all junk, spam, and other folders */
checkAllEmailFolders: string;
/** Checkmate */
checkmate: string;
/** Also check your spam folder, it might end up there. If so, mark it as not spam. */
Expand Down Expand Up @@ -3275,6 +3277,8 @@ interface I18n {
ifRatingIsPlusMinusX: I18nFormat;
/** If registered */
ifRegistered: string;
/** If you do not get the email within 5 minutes: */
ifYouDoNotGetTheEmail: string;
/** If you don't see the email, check other places it might be, like your junk, spam, social, or other folders. */
ifYouDoNotSeeTheEmailCheckOtherPlaces: string;
/** Important */
Expand Down Expand Up @@ -4223,6 +4227,8 @@ interface I18n {
variantWin: string;
/** Variation arrows let you navigate without using the move list. */
variationArrowsInfo: string;
/** Verify that %s is your email address */
verifyYourAddress: I18nFormat;
/** Victory */
victory: string;
/** %1$s vs %2$s in %3$s */
Expand Down
8 changes: 8 additions & 0 deletions ui/bits/css/_auth.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
min-height: calc(95vh - #{$site-header-outer-height} - 4em);
}

.checklist {
font-size: 1.5em;
font-weight: 700;
li {
list-style: disc inside;
}
}

.auth {
width: 100%;
margin: auto;
Expand Down
Loading