From 15e75ca7b34fc428073bdc6b8c58ac00b8017200 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 23 Jun 2018 17:12:00 +0100 Subject: [PATCH] generate local errors for blank fields during login Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/login/Login.js | 8 ++++ src/components/views/login/PasswordLogin.js | 51 +++++++++++++++++---- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/src/components/structures/login/Login.js b/src/components/structures/login/Login.js index bc04434bb2..43264e7003 100644 --- a/src/components/structures/login/Login.js +++ b/src/components/structures/login/Login.js @@ -93,6 +93,13 @@ module.exports = React.createClass({ this._unmounted = true; }, + onPasswordLoginError: function(errorText) { + this.setState({ + errorText, + loginIncorrect: Boolean(errorText), + }); + }, + onPasswordLogin: function(username, phoneCountry, phoneNumber, password) { this.setState({ busy: true, @@ -357,6 +364,7 @@ module.exports = React.createClass({ return (