From 7d6985647ff57f435000b0d07860f8695e81fd0c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 14 Jul 2020 13:17:51 -0400 Subject: [PATCH] Some password reset UI fixes. Fixes #955 --- ui/src/components/comment-form.tsx | 5 ++++- ui/src/components/login.tsx | 25 +++++++++++++++++-------- ui/translations/en.json | 1 + 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index 00b4fe1e..b9f1e815 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -258,7 +258,10 @@ export class CommentForm extends Component { - ## + # + + # + )} diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index eb1d0baf..4dd3821a 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -120,14 +120,15 @@ export class Login extends Component { class="form-control" required /> - + {validEmail(this.state.loginForm.username_or_email) && ( + + )}
@@ -186,6 +187,14 @@ export class Login extends Component { onInput={linkEvent(this, this.handleRegisterEmailChange)} minLength={3} /> + {!validEmail(this.state.registerForm.email) && ( + + )}
diff --git a/ui/translations/en.json b/ui/translations/en.json index cb4347f1..90c4a995 100644 --- a/ui/translations/en.json +++ b/ui/translations/en.json @@ -253,6 +253,7 @@ "Couldn't find that username or email.", "password_incorrect": "Password incorrect.", "passwords_dont_match": "Passwords do not match.", + "no_password_reset": "You will not be able to reset your password without an email.", "invalid_username": "Invalid username.", "admin_already_created": "Sorry, there's already an admin.", "user_already_exists": "User already exists.", -- 2.44.1