From 7934a2950cb36cdec1226c21f6b0de868007304c Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 25 Jan 2019 15:08:28 -0600 Subject: [PATCH] Add 'Your account' header --- res/css/views/auth/_AuthBody.scss | 12 ++++++++++++ res/css/views/auth/_AuthPage.scss | 6 ------ src/components/views/auth/PasswordLogin.js | 9 +++++---- src/i18n/strings/en_EN.json | 3 ++- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/res/css/views/auth/_AuthBody.scss b/res/css/views/auth/_AuthBody.scss index cb28d57801..21641978b6 100644 --- a/res/css/views/auth/_AuthBody.scss +++ b/res/css/views/auth/_AuthBody.scss @@ -24,6 +24,18 @@ limitations under the License. color: $authpage-body-color; } +.mx_AuthBody h2 { + font-size: 24px; + font-weight: 600; + margin-top: 8px; +} + +.mx_AuthBody h3 { + font-size: 14px; + font-weight: 600; + color: $primary-fg-color; +} + .mx_AuthBody a:link, .mx_AuthBody a:hover, .mx_AuthBody a:visited { diff --git a/res/css/views/auth/_AuthPage.scss b/res/css/views/auth/_AuthPage.scss index 04dab59ed6..cf509248fd 100644 --- a/res/css/views/auth/_AuthPage.scss +++ b/res/css/views/auth/_AuthPage.scss @@ -23,12 +23,6 @@ limitations under the License. background-color: $authpage-bg-color; } -.mx_AuthPage h2 { - font-size: 24px; - font-weight: 600; - margin-top: 8px; -} - .mx_AuthPage_modal { display: flex; margin: 100px auto auto; diff --git a/src/components/views/auth/PasswordLogin.js b/src/components/views/auth/PasswordLogin.js index 5b56f1da00..5bf40ea098 100644 --- a/src/components/views/auth/PasswordLogin.js +++ b/src/components/views/auth/PasswordLogin.js @@ -252,13 +252,13 @@ class PasswordLogin extends React.Component { ; } - let matrixIdText = _t('Matrix ID'); + let yourMatrixAccountText = _t('Your account'); if (this.props.hsName) { - matrixIdText = _t('%(serverName)s Matrix ID', {serverName: this.props.hsName}); + yourMatrixAccountText = _t('Your %(serverName)s account', {serverName: this.props.hsName}); } else { try { const parsedHsUrl = new URL(this.props.hsUrl); - matrixIdText = _t('%(serverName)s Matrix ID', {serverName: parsedHsUrl.hostname}); + yourMatrixAccountText = _t('Your %(serverName)s account', {serverName: parsedHsUrl.hostname}); } catch (e) { // ignore } @@ -282,7 +282,7 @@ class PasswordLogin extends React.Component { className="mx_Login_type_dropdown" value={this.state.loginType} onOptionChange={this.onLoginTypeChange}> - { matrixIdText } + { _t('Username') } { _t('Email address') } { _t('Phone') } @@ -292,6 +292,7 @@ class PasswordLogin extends React.Component { return (
+

{ yourMatrixAccountText }

{ loginType } { loginField } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 13f9b03876..40c737dc5d 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1187,7 +1187,8 @@ "Username": "Username", "Mobile phone number": "Mobile phone number", "Not sure of your password? Set a new one": "Not sure of your password? Set a new one", - "%(serverName)s Matrix ID": "%(serverName)s Matrix ID", + "Your account": "Your account", + "Your %(serverName)s account": "Your %(serverName)s account", "Sign in with": "Sign in with", "Sign in": "Sign in", "If you don't specify an email address, you won't be able to reset your password. Are you sure?": "If you don't specify an email address, you won't be able to reset your password. Are you sure?",