+ {_t("An email has been sent to %(emailAddress)s. Once you've followed the " +
+ "link it contains, click below.", { emailAddress: this.state.email })}
+
+
+
;
+ },
+
+ renderDone() {
+ return
+
{_t("Your password has been reset.")}
+
{_t(
+ "You have been logged out of all devices and will no longer receive " +
+ "push notifications. To re-enable notifications, sign in again on each " +
+ "device.",
+ )}
- { _t("An email has been sent to %(emailAddress)s. Once you've followed the link it contains, " +
- "click below.", { emailAddress: this.state.email }) }
-
-
-
{ _t('You have been logged out of all devices and will no longer receive push notifications. ' +
- 'To re-enable notifications, sign in again on each device') }.
- );
+ switch (this.state.phase) {
+ case PHASE_SERVER_DETAILS:
+ resetPasswordJsx = this.renderServerDetails();
+ break;
+ case PHASE_FORGOT:
+ resetPasswordJsx = this.renderForgot();
+ break;
+ case PHASE_SENDING_EMAIL:
+ resetPasswordJsx = this.renderSendingEmail();
+ break;
+ case PHASE_EMAIL_SENT:
+ resetPasswordJsx = this.renderEmailSent();
+ break;
+ case PHASE_DONE:
+ resetPasswordJsx = this.renderDone();
+ break;
}
-
return (
diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js
index 8524447ed4e..025f68bb8f5 100644
--- a/src/components/structures/auth/Login.js
+++ b/src/components/structures/auth/Login.js
@@ -31,10 +31,10 @@ import { AutoDiscovery } from "matrix-js-sdk";
const PHONE_NUMBER_REGEX = /^[0-9()\-\s]*$/;
// Phases
-// Show the appropriate login flow(s) for the server
-const PHASE_LOGIN = 0;
// Show controls to configure server details
-const PHASE_SERVER_DETAILS = 1;
+const PHASE_SERVER_DETAILS = 0;
+// Show the appropriate login flow(s) for the server
+const PHASE_LOGIN = 1;
// Enable phases for login
const PHASES_ENABLED = true;
@@ -514,7 +514,6 @@ module.exports = React.createClass({
}
if (PHASES_ENABLED && this.state.phase !== PHASE_SERVER_DETAILS) {
- // TODO: ...
return null;
}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 9e5b32f24c8..b411a7c003f 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1374,16 +1374,17 @@
"A new password must be entered.": "A new password must be entered.",
"New passwords must match each other.": "New passwords must match each other.",
"Resetting password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Resetting password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.",
+ "Your account": "Your account",
+ "Your account on %(serverName)s": "Your account on %(serverName)s",
+ "The homeserver URL %(hsUrl)s doesn't seem to be valid URL. Please enter a valid URL including the protocol prefix.": "The homeserver URL %(hsUrl)s doesn't seem to be valid URL. Please enter a valid URL including the protocol prefix.",
+ "A verification email will be sent to your inbox to confirm setting your new password.": "A verification email will be sent to your inbox to confirm setting your new password.",
+ "Send Reset Email": "Send Reset Email",
+ "Sign in instead": "Sign in instead",
"An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.": "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.",
"I have verified my email address": "I have verified my email address",
- "Your password has been reset": "Your password has been reset",
- "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device",
+ "Your password has been reset.": "Your password has been reset.",
+ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device.": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device.",
"Return to login screen": "Return to login screen",
- "To reset your password, enter the email address linked to your account": "To reset your password, enter the email address linked to your account",
- "New password": "New password",
- "Confirm your new password": "Confirm your new password",
- "Send Reset Email": "Send Reset Email",
- "Sign in instead": "Sign in instead",
"Set a new password": "Set a new password",
"Invalid homeserver discovery response": "Invalid homeserver discovery response",
"Invalid identity server discovery response": "Invalid identity server discovery response",