Add create your account header
This commit is contained in:
parent
3f4001f1fe
commit
1f78b59a0e
3 changed files with 21 additions and 1 deletions
|
@ -443,6 +443,8 @@ module.exports = React.createClass({
|
||||||
onError={this.onFormValidationFailed}
|
onError={this.onFormValidationFailed}
|
||||||
onRegisterClick={this.onFormSubmit}
|
onRegisterClick={this.onFormSubmit}
|
||||||
flows={this.state.flows}
|
flows={this.state.flows}
|
||||||
|
hsUrl={this.state.hsUrl}
|
||||||
|
hsName={this.props.defaultServerName}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -256,6 +256,22 @@ module.exports = React.createClass({
|
||||||
render: function() {
|
render: function() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
|
let yourMatrixAccountText = _t('Create your account');
|
||||||
|
if (this.props.hsName) {
|
||||||
|
yourMatrixAccountText = _t('Create your %(serverName)s account', {
|
||||||
|
serverName: this.props.hsName,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
const parsedHsUrl = new URL(this.props.hsUrl);
|
||||||
|
yourMatrixAccountText = _t('Create your %(serverName)s account', {
|
||||||
|
serverName: parsedHsUrl.hostname,
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const emailPlaceholder = this._authStepIsRequired('m.login.email.identity') ?
|
const emailPlaceholder = this._authStepIsRequired('m.login.email.identity') ?
|
||||||
_t("Email address") :
|
_t("Email address") :
|
||||||
_t("Email address (optional)");
|
_t("Email address (optional)");
|
||||||
|
@ -309,6 +325,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<h3>{yourMatrixAccountText}</h3>
|
||||||
<form onSubmit={this.onSubmit}>
|
<form onSubmit={this.onSubmit}>
|
||||||
{ emailSection }
|
{ emailSection }
|
||||||
{ phoneSection }
|
{ phoneSection }
|
||||||
|
|
|
@ -1200,6 +1200,8 @@
|
||||||
"Sign in with": "Sign in with",
|
"Sign in with": "Sign in with",
|
||||||
"Sign in": "Sign in",
|
"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?",
|
"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?",
|
||||||
|
"Create your account": "Create your account",
|
||||||
|
"Create your %(serverName)s account": "Create your %(serverName)s account",
|
||||||
"Email address (optional)": "Email address (optional)",
|
"Email address (optional)": "Email address (optional)",
|
||||||
"Mobile phone number (optional)": "Mobile phone number (optional)",
|
"Mobile phone number (optional)": "Mobile phone number (optional)",
|
||||||
"Other servers": "Other servers",
|
"Other servers": "Other servers",
|
||||||
|
@ -1416,7 +1418,6 @@
|
||||||
"A phone number is required to register on this homeserver.": "A phone number is required to register on this homeserver.",
|
"A phone number is required to register on this homeserver.": "A phone number is required to register on this homeserver.",
|
||||||
"You need to enter a username.": "You need to enter a username.",
|
"You need to enter a username.": "You need to enter a username.",
|
||||||
"An unknown error occurred.": "An unknown error occurred.",
|
"An unknown error occurred.": "An unknown error occurred.",
|
||||||
"Create your account": "Create your account",
|
|
||||||
"Commands": "Commands",
|
"Commands": "Commands",
|
||||||
"Results from DuckDuckGo": "Results from DuckDuckGo",
|
"Results from DuckDuckGo": "Results from DuckDuckGo",
|
||||||
"Emoji": "Emoji",
|
"Emoji": "Emoji",
|
||||||
|
|
Loading…
Reference in a new issue