Add 'Your account' header

This commit is contained in:
J. Ryan Stinnett 2019-01-25 15:08:28 -06:00
parent e5e0b34958
commit 7934a2950c
4 changed files with 19 additions and 11 deletions

View file

@ -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 {

View file

@ -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;

View file

@ -252,13 +252,13 @@ class PasswordLogin extends React.Component {
</span>;
}
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}>
<span key={PasswordLogin.LOGIN_FIELD_MXID}>{ matrixIdText }</span>
<span key={PasswordLogin.LOGIN_FIELD_MXID}>{ _t('Username') }</span>
<span key={PasswordLogin.LOGIN_FIELD_EMAIL}>{ _t('Email address') }</span>
<span key={PasswordLogin.LOGIN_FIELD_PHONE}>{ _t('Phone') }</span>
</Dropdown>
@ -292,6 +292,7 @@ class PasswordLogin extends React.Component {
return (
<div>
<h3>{ yourMatrixAccountText }</h3>
<form onSubmit={this.onSubmitForm}>
{ loginType }
{ loginField }

View file

@ -1187,7 +1187,8 @@
"Username": "Username",
"Mobile phone number": "Mobile phone number",
"Not sure of your password? <a>Set a new one</a>": "Not sure of your password? <a>Set a new one</a>",
"%(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?",