Add create your account header

This commit is contained in:
J. Ryan Stinnett 2019-01-29 12:23:01 -06:00
parent 3f4001f1fe
commit 1f78b59a0e
3 changed files with 21 additions and 1 deletions

View file

@ -256,6 +256,22 @@ module.exports = React.createClass({
render: function() {
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') ?
_t("Email address") :
_t("Email address (optional)");
@ -309,6 +325,7 @@ module.exports = React.createClass({
return (
<div>
<h3>{yourMatrixAccountText}</h3>
<form onSubmit={this.onSubmit}>
{ emailSection }
{ phoneSection }