From 613710b75c25394208aa270b1bcf46de552c323e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 23 Nov 2020 11:28:49 +0000 Subject: [PATCH] Iterate Auth copy --- res/css/structures/auth/_Login.scss | 4 +++- res/css/views/auth/_AuthBody.scss | 9 ++++++++ src/components/structures/auth/Login.tsx | 8 ++++--- .../structures/auth/Registration.tsx | 10 +++++---- src/components/views/auth/PasswordLogin.tsx | 22 +++++++------------ .../views/auth/RegistrationForm.tsx | 18 ++++++++------- src/i18n/strings/en_EN.json | 12 +++++----- 7 files changed, 48 insertions(+), 35 deletions(-) diff --git a/res/css/structures/auth/_Login.scss b/res/css/structures/auth/_Login.scss index 02436833a2..0774ac273d 100644 --- a/res/css/structures/auth/_Login.scss +++ b/res/css/structures/auth/_Login.scss @@ -18,7 +18,7 @@ limitations under the License. .mx_Login_submit { @mixin mx_DialogButton; width: 100%; - margin-top: 35px; + margin-top: 24px; margin-bottom: 24px; box-sizing: border-box; text-align: center; @@ -91,6 +91,8 @@ limitations under the License. } div.mx_AccessibleButton_kind_link.mx_Login_forgot { + display: block; + margin: 0 auto; // style it as a link font-size: inherit; padding: 0; diff --git a/res/css/views/auth/_AuthBody.scss b/res/css/views/auth/_AuthBody.scss index 0ba0d10e06..b51511a671 100644 --- a/res/css/views/auth/_AuthBody.scss +++ b/res/css/views/auth/_AuthBody.scss @@ -146,6 +146,15 @@ limitations under the License. display: block; text-align: center; width: 100%; + margin-top: 24px; + + > a { + font-weight: $font-semi-bold; + } +} + +form + .mx_AuthBody_changeFlow { + margin-top: 0; } .mx_AuthBody_spinner { diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index 4cd8981a65..17220981c9 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -670,9 +670,11 @@ export default class LoginComponent extends React.Component { ; } else if (SettingsStore.getValue(UIFeature.Registration)) { footer = ( - - { _t('Create account') } - + + {_t("New? Create account", {}, { + a: sub => { sub }, + })} + ); } diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index f97f20cf59..004029c920 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -650,9 +650,11 @@ export default class Registration extends React.Component { ); } - const signIn = - { _t('Sign in instead') } - ; + const signIn = + {_t("Already have an account? Sign in here", {}, { + a: sub => { sub }, + })} + ; // Only show the 'go back' button if you're not looking at the form let goBack; @@ -736,7 +738,7 @@ export default class Registration extends React.Component { } body =
-

{ _t('Create your account') }

+

{ _t('Create account') }

{ errorText } { serverDeadSection } { this.renderServerComponent() } diff --git a/src/components/views/auth/PasswordLogin.tsx b/src/components/views/auth/PasswordLogin.tsx index f29418d50e..198c76849c 100644 --- a/src/components/views/auth/PasswordLogin.tsx +++ b/src/components/views/auth/PasswordLogin.tsx @@ -411,20 +411,14 @@ export default class PasswordLogin extends React.PureComponent { let forgotPasswordJsx; if (this.props.onForgotPasswordClick) { - forgotPasswordJsx = - {_t('Not sure of your password? Set a new one', {}, { - a: sub => ( - - {sub} - - ), - })} - ; + forgotPasswordJsx = + {_t("Forgot password?")} + ; } const pwFieldClass = classNames({ diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index 764dfdd526..610618bb3e 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -540,17 +540,19 @@ export default class RegistrationForm extends React.PureComponent - {_t( - "Set an email for account recovery. " + - "Use email or phone to optionally be discoverable by existing contacts.", - )} + { + _t("Add an email to be able to reset your password.") + } { + _t("Use email or phone to optionally be discoverable by existing contacts.") + }
; } else { emailHelperText =
- {_t( - "Set an email for account recovery. " + - "Use email to optionally be discoverable by existing contacts.", - )} + { + _t("Add an email to be able to reset your password.") + } { + _t("Use email to optionally be discoverable by existing contacts.") + }
; } } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b66df6c761..fff7bdac44 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2235,7 +2235,7 @@ "Email": "Email", "Username": "Username", "Phone": "Phone", - "Not sure of your password? Set a new one": "Not sure of your password? Set a new one", + "Forgot password?": "Forgot password?", "Sign in with": "Sign in with", "Sign in": "Sign in", "No identity server is configured so you cannot add an email address in order to reset your password in the future.": "No identity server is configured so you cannot add an email address in order to reset your password in the future.", @@ -2247,8 +2247,9 @@ "Use lowercase letters, numbers, dashes and underscores only": "Use lowercase letters, numbers, dashes and underscores only", "Phone (optional)": "Phone (optional)", "Register": "Register", - "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.", - "Set an email for account recovery. Use email to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email to optionally be discoverable by existing contacts.", + "Add an email to be able to reset your password.": "Add an email to be able to reset your password.", + "Use email or phone to optionally be discoverable by existing contacts.": "Use email or phone to optionally be discoverable by existing contacts.", + "Use email to optionally be discoverable by existing contacts.": "Use email to optionally be discoverable by existing contacts.", "Enter your custom homeserver URL What does this mean?": "Enter your custom homeserver URL What does this mean?", "Homeserver URL": "Homeserver URL", "Enter your custom identity server URL What does this mean?": "Enter your custom identity server URL What does this mean?", @@ -2456,10 +2457,11 @@ "Syncing...": "Syncing...", "Signing In...": "Signing In...", "If you've joined lots of rooms, this might take a while": "If you've joined lots of rooms, this might take a while", - "Create account": "Create account", + "New? Create account": "New? Create account", "Unable to query for supported registration methods.": "Unable to query for supported registration methods.", "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", + "Already have an account? Sign in here": "Already have an account? Sign in here", "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).": "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).", "Continue with previous account": "Continue with previous account", "Log in to your new account.": "Log in to your new account.", @@ -2467,7 +2469,7 @@ "Registration Successful": "Registration Successful", "Create your Matrix account on %(serverName)s": "Create your Matrix account on %(serverName)s", "Create your Matrix account on ": "Create your Matrix account on ", - "Create your account": "Create your account", + "Create account": "Create account", "Use Recovery Key or Passphrase": "Use Recovery Key or Passphrase", "Use Recovery Key": "Use Recovery Key", "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.",