From ccf7e75c951fdda78de1bad15d4f0777653c0495 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 15:10:16 +0000 Subject: [PATCH 01/15] Group fields into rows on reset password --- .../structures/auth/ForgotPassword.js | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 7b7a700d60e..e49d4a9d78e 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -1,6 +1,6 @@ /* Copyright 2015, 2016 OpenMarket Ltd -Copyright 2017, 2018 New Vector Ltd +Copyright 2017, 2018, 2019 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -233,24 +233,25 @@ module.exports = React.createClass({

- -
- -
- -
+
+ +
+
+ + +
{ serverConfigSection } From 5d0798ed24b6ac5d06f0b0403f0e0bb0a19c9870 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 15:16:54 +0000 Subject: [PATCH 02/15] Tweak field labels on reset password --- src/components/structures/auth/ForgotPassword.js | 6 +++--- src/i18n/strings/en_EN.json | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index e49d4a9d78e..56f43b9ffa0 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -238,19 +238,19 @@ module.exports = React.createClass({ name="reset_email" // define a name so browser's password autofill gets less confused value={this.state.email} onChange={this.onInputChanged.bind(this, "email")} - placeholder={_t('Email address')} autoFocus /> + placeholder={_t('Email')} autoFocus />
+ placeholder={_t('Password')} /> + placeholder={_t('Confirm')} />
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9e5b32f24c8..02c29778bb6 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1380,8 +1380,6 @@ "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", From 8c6dc002f3e1384f20a7966cd91a9a747ecd92a3 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 15:46:25 +0000 Subject: [PATCH 03/15] Add new footer text to reset password --- .../structures/auth/ForgotPassword.js | 70 +++++++++---------- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 34 insertions(+), 38 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 56f43b9ffa0..1e8d223bdbe 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -226,45 +226,41 @@ module.exports = React.createClass({ errorText =
{ err }
; } - resetPasswordJsx = ( -
-

- { _t('To reset your password, enter the email address linked to your account') }: -

-
-
-
- -
-
- - -
- -
- { serverConfigSection } - { errorText } - - { _t('Sign in instead') } - -
-
- ); + resetPasswordJsx =
+
+
+ +
+
+ + +
+ {_t( + 'A verification email will be sent to your inbox to confirm ' + + 'setting your new password.', + )} + +
+ {serverConfigSection} + {errorText} + + {_t('Sign in instead')} + +
; } - return ( diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 02c29778bb6..1c607be0d7f 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1379,7 +1379,7 @@ "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", + "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", "Set a new password": "Set a new password", From 8e12c4a3b8bc68ec6067305a9eae4d77f0656d29 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 15:58:31 +0000 Subject: [PATCH 04/15] Normalize URL naming for reset password --- src/components/structures/auth/ForgotPassword.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 1e8d223bdbe..9583fac270e 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -47,8 +47,8 @@ module.exports = React.createClass({ getInitialState: function() { return { - enteredHomeserverUrl: this.props.customHsUrl || this.props.defaultHsUrl, - enteredIdentityServerUrl: this.props.customIsUrl || this.props.defaultIsUrl, + enteredHsUrl: this.props.customHsUrl || this.props.defaultHsUrl, + enteredIsUrl: this.props.customIsUrl || this.props.defaultIsUrl, progress: null, password: null, password2: null, @@ -126,7 +126,7 @@ module.exports = React.createClass({ onFinished: (confirmed) => { if (confirmed) { this.submitPasswordReset( - this.state.enteredHomeserverUrl, this.state.enteredIdentityServerUrl, + this.state.enteredHsUrl, this.state.enteredIsUrl, this.state.email, this.state.password, ); } @@ -153,10 +153,10 @@ module.exports = React.createClass({ onServerConfigChange: function(config) { const newState = {}; if (config.hsUrl !== undefined) { - newState.enteredHomeserverUrl = config.hsUrl; + newState.enteredHsUrl = config.hsUrl; } if (config.isUrl !== undefined) { - newState.enteredIdentityServerUrl = config.isUrl; + newState.enteredIsUrl = config.isUrl; } this.setState(newState); }, From 8aff6b2e453e01141558666df55086fca27510e1 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 16:14:21 +0000 Subject: [PATCH 05/15] Add your account header to reset password --- src/components/structures/auth/ForgotPassword.js | 13 +++++++++++++ src/i18n/strings/en_EN.json | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 9583fac270e..a2ed97d1cf6 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -226,7 +226,20 @@ module.exports = React.createClass({ errorText =
{ err }
; } + let yourMatrixAccountText = _t('Your account'); + try { + const parsedHsUrl = new URL(this.state.enteredHsUrl); + yourMatrixAccountText = _t('Your account on %(serverName)s', { + serverName: parsedHsUrl.hostname, + }); + } catch (e) { + // ignore + } + resetPasswordJsx =
+

+ {yourMatrixAccountText} +

Date: Wed, 6 Feb 2019 16:30:53 +0000 Subject: [PATCH 06/15] Convert forgot password to phases like the other flows --- .../structures/auth/ForgotPassword.js | 28 +++++++++++++------ src/components/structures/auth/Login.js | 6 ++-- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index a2ed97d1cf6..1fbcd8dfd48 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -25,6 +25,18 @@ import SdkConfig from "../../../SdkConfig"; import PasswordReset from "../../../PasswordReset"; +// Phases +// Show controls to configure server details +const PHASE_SERVER_DETAILS = 0; +// Show the forgot password inputs +const PHASE_FORGOT = 1; +// Email is in the process of being sent +const PHASE_SENDING_EMAIL = 2; +// Email has been sent +const PHASE_EMAIL_SENT = 3; +// User has clicked the link in email and completed reset +const PHASE_DONE = 4; + module.exports = React.createClass({ displayName: 'ForgotPassword', @@ -49,7 +61,7 @@ module.exports = React.createClass({ return { enteredHsUrl: this.props.customHsUrl || this.props.defaultHsUrl, enteredIsUrl: this.props.customIsUrl || this.props.defaultIsUrl, - progress: null, + phase: null, password: null, password2: null, errorText: null, @@ -58,17 +70,17 @@ module.exports = React.createClass({ submitPasswordReset: function(hsUrl, identityUrl, email, password) { this.setState({ - progress: "sending_email", + phase: PHASE_SENDING_EMAIL, }); this.reset = new PasswordReset(hsUrl, identityUrl); this.reset.resetPassword(email, password).done(() => { this.setState({ - progress: "sent_email", + phase: PHASE_EMAIL_SENT, }); }, (err) => { this.showErrorDialog(_t('Failed to send email') + ": " + err.message); this.setState({ - progress: null, + phase: null, }); }); }, @@ -80,7 +92,7 @@ module.exports = React.createClass({ return; } this.reset.checkEmailLinkClicked().done((res) => { - this.setState({ progress: "complete" }); + this.setState({ phase: PHASE_DONE }); }, (err) => { this.showErrorDialog(err.message); }); @@ -184,9 +196,9 @@ module.exports = React.createClass({ let resetPasswordJsx; - if (this.state.progress === "sending_email") { + if (this.state.phase === PHASE_SENDING_EMAIL) { resetPasswordJsx = ; - } else if (this.state.progress === "sent_email") { + } else if (this.state.phase === PHASE_EMAIL_SENT) { resetPasswordJsx = (
{ _t("An email has been sent to %(emailAddress)s. Once you've followed the link it contains, " + @@ -196,7 +208,7 @@ module.exports = React.createClass({ value={_t('I have verified my email address')} />
); - } else if (this.state.progress === "complete") { + } else if (this.state.phase === PHASE_DONE) { resetPasswordJsx = (

{ _t('Your password has been reset') }.

diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index 8524447ed4e..893b4302146 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; From a61de03a88adbe2f3cefedc6fb1e2b757a7c51c5 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 16:32:22 +0000 Subject: [PATCH 07/15] Remove left over TODO --- src/components/structures/auth/Login.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index 893b4302146..025f68bb8f5 100644 --- a/src/components/structures/auth/Login.js +++ b/src/components/structures/auth/Login.js @@ -514,7 +514,6 @@ module.exports = React.createClass({ } if (PHASES_ENABLED && this.state.phase !== PHASE_SERVER_DETAILS) { - // TODO: ... return null; } From 3afc455f3caaaebc4d54359d308acd50bab9145b Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 16:46:49 +0000 Subject: [PATCH 08/15] Extract each phase to a separate function --- .../structures/auth/ForgotPassword.js | 208 ++++++++++-------- 1 file changed, 116 insertions(+), 92 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 1fbcd8dfd48..2db13624c34 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -61,7 +61,7 @@ module.exports = React.createClass({ return { enteredHsUrl: this.props.customHsUrl || this.props.defaultHsUrl, enteredIsUrl: this.props.customIsUrl || this.props.defaultIsUrl, - phase: null, + phase: PHASE_FORGOT, password: null, password2: null, errorText: null, @@ -187,103 +187,127 @@ module.exports = React.createClass({ }); }, + renderServerDetails() { + return null; + }, + + renderForgot() { + const ServerConfig = sdk.getComponent("auth.ServerConfig"); + + let serverConfigSection; + if (!SdkConfig.get()['disable_custom_urls']) { + serverConfigSection = ( + + ); + } + + let errorText = null; + const err = this.state.errorText || this.props.defaultServerDiscoveryError; + if (err) { + errorText =
{ err }
; + } + + let yourMatrixAccountText = _t('Your account'); + try { + const parsedHsUrl = new URL(this.state.enteredHsUrl); + yourMatrixAccountText = _t('Your account on %(serverName)s', { + serverName: parsedHsUrl.hostname, + }); + } catch (e) { + // ignore + } + + return
+

+ {yourMatrixAccountText} +

+ +
+ +
+
+ + +
+ {_t( + 'A verification email will be sent to your inbox to confirm ' + + 'setting your new password.', + )} + + + {serverConfigSection} + {errorText} + + {_t('Sign in instead')} + +
; + }, + + renderSendingEmail() { + const Spinner = sdk.getComponent("elements.Spinner"); + return ; + }, + + renderEmailSent() { + return
+ {_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')}.

+ +
; + }, + render: function() { const AuthPage = sdk.getComponent("auth.AuthPage"); const AuthHeader = sdk.getComponent("auth.AuthHeader"); const AuthBody = sdk.getComponent("auth.AuthBody"); - const ServerConfig = sdk.getComponent("auth.ServerConfig"); - const Spinner = sdk.getComponent("elements.Spinner"); let resetPasswordJsx; - - if (this.state.phase === PHASE_SENDING_EMAIL) { - resetPasswordJsx = ; - } else if (this.state.phase === PHASE_EMAIL_SENT) { - resetPasswordJsx = ( -
- { _t("An email has been sent to %(emailAddress)s. Once you've followed the link it contains, " + - "click below.", { emailAddress: this.state.email }) } -
- -
- ); - } else if (this.state.phase === PHASE_DONE) { - resetPasswordJsx = ( -
-

{ _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') }.

- -
- ); - } else { - let serverConfigSection; - if (!SdkConfig.get()['disable_custom_urls']) { - serverConfigSection = ( - - ); - } - - let errorText = null; - const err = this.state.errorText || this.props.defaultServerDiscoveryError; - if (err) { - errorText =
{ err }
; - } - - let yourMatrixAccountText = _t('Your account'); - try { - const parsedHsUrl = new URL(this.state.enteredHsUrl); - yourMatrixAccountText = _t('Your account on %(serverName)s', { - serverName: parsedHsUrl.hostname, - }); - } catch (e) { - // ignore - } - - resetPasswordJsx =
-

- {yourMatrixAccountText} -

-
-
- -
-
- - -
- {_t( - 'A verification email will be sent to your inbox to confirm ' + - 'setting your new password.', - )} - -
- {serverConfigSection} - {errorText} - - {_t('Sign in instead')} - -
; + 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 ( From 0e543a362eb7eb9ac21b528f3853395e24422d4e Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 18:10:06 +0000 Subject: [PATCH 09/15] Move errors to top of reset password --- src/components/structures/auth/ForgotPassword.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 2db13624c34..4c507c82f78 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -227,6 +227,7 @@ module.exports = React.createClass({

{yourMatrixAccountText}

+ {errorText}
{serverConfigSection} - {errorText} {_t('Sign in instead')} From 768066733439f18b8f7e4887bc08f88da1d5ad34 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 18:26:44 +0000 Subject: [PATCH 10/15] Avoid controlled component error with empty strings --- src/components/structures/auth/ForgotPassword.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 4c507c82f78..be9c4321b68 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -62,8 +62,9 @@ module.exports = React.createClass({ enteredHsUrl: this.props.customHsUrl || this.props.defaultHsUrl, enteredIsUrl: this.props.customIsUrl || this.props.defaultIsUrl, phase: PHASE_FORGOT, - password: null, - password2: null, + email: "", + password: "", + password2: "", errorText: null, }; }, From 9f9f0d4168bda2353701959864575b5e01b586ca Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 18:30:07 +0000 Subject: [PATCH 11/15] Move server details to a separate phase of forgot password --- .../structures/auth/ForgotPassword.js | 62 ++++++++++++++----- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index be9c4321b68..e74c28e04d9 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -174,6 +174,21 @@ module.exports = React.createClass({ this.setState(newState); }, + onServerDetailsNextPhaseClick(ev) { + ev.stopPropagation(); + this.setState({ + phase: PHASE_FORGOT, + }); + }, + + onEditServerDetailsClick(ev) { + ev.preventDefault(); + ev.stopPropagation(); + this.setState({ + phase: PHASE_SERVER_DETAILS, + }); + }, + onLoginClick: function(ev) { ev.preventDefault(); ev.stopPropagation(); @@ -189,25 +204,30 @@ module.exports = React.createClass({ }, renderServerDetails() { - return null; - }, - - renderForgot() { const ServerConfig = sdk.getComponent("auth.ServerConfig"); + const AccessibleButton = sdk.getComponent("elements.AccessibleButton"); - let serverConfigSection; - if (!SdkConfig.get()['disable_custom_urls']) { - serverConfigSection = ( - - ); + if (SdkConfig.get()['disable_custom_urls']) { + return null; } + return
+ + + {_t("Next")} + +
; + }, + + renderForgot() { let errorText = null; const err = this.state.errorText || this.props.defaultServerDiscoveryError; if (err) { @@ -224,9 +244,20 @@ module.exports = React.createClass({ // ignore } + // If custom URLs are allowed, wire up the server details edit link. + let editLink = null; + if (!SdkConfig.get()['disable_custom_urls']) { + editLink = + {_t('Change')} + ; + } + return

{yourMatrixAccountText} + {editLink}

{errorText}
@@ -255,7 +286,6 @@ module.exports = React.createClass({ )}
- {serverConfigSection} {_t('Sign in instead')} From 2b7ecd3de7d508381fe9d25023a175b2e2596b88 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 6 Feb 2019 18:32:28 +0000 Subject: [PATCH 12/15] Go to forgot phase on error --- src/components/structures/auth/ForgotPassword.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index e74c28e04d9..9b7b1cf54f0 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -81,7 +81,7 @@ module.exports = React.createClass({ }, (err) => { this.showErrorDialog(_t('Failed to send email') + ": " + err.message); this.setState({ - phase: null, + phase: PHASE_FORGOT, }); }); }, From e1b7af39dc315ec74a24682d6f62fffb464552d9 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 7 Feb 2019 09:36:43 +0000 Subject: [PATCH 13/15] Basic validation of HS URL for reset password --- src/components/structures/auth/ForgotPassword.js | 7 ++++++- src/i18n/strings/en_EN.json | 11 ++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 9b7b1cf54f0..143df85018c 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -241,7 +241,12 @@ module.exports = React.createClass({ serverName: parsedHsUrl.hostname, }); } catch (e) { - // ignore + errorText =
{_t( + "The homeserver URL %(hsUrl)s doesn't seem to be valid URL. Please " + + "enter a valid URL including the protocol prefix.", + { + hsUrl: this.state.enteredHsUrl, + })}
; } // If custom URLs are allowed, wire up the server details edit link. diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 790e261f90a..d6bf9dd0963 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.", - "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", - "Return to login screen": "Return to login screen", "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", + "Return to login screen": "Return to login screen", "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", From 8b2f2c7d5ce9383d8339f34f754b2434be394828 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 7 Feb 2019 09:44:28 +0000 Subject: [PATCH 14/15] Remove unneeded refs from reset password --- src/components/structures/auth/ForgotPassword.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 143df85018c..df5660eed40 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -212,7 +212,7 @@ module.exports = React.createClass({ } return
-
-
- - Date: Thu, 7 Feb 2019 09:57:31 +0000 Subject: [PATCH 15/15] Update style for forgot password copy, add full stops --- src/components/structures/auth/ForgotPassword.js | 9 ++++++--- src/i18n/strings/en_EN.json | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index df5660eed40..8eb1e9ce705 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -314,9 +314,12 @@ module.exports = React.createClass({ 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("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.", + )}

; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index d6bf9dd0963..b411a7c003f 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1382,8 +1382,8 @@ "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", "Set a new password": "Set a new password", "Invalid homeserver discovery response": "Invalid homeserver discovery response",