mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Merge pull request #3526 from matrix-org/travis/recaptcha-fix
Null-guard the recaptcha setup
This commit is contained in:
commit
9200c55ce0
@ -190,14 +190,24 @@ export const RecaptchaAuthEntry = createReactClass({
|
|||||||
return <Loader />;
|
return <Loader />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let errorText = this.props.errorText;
|
||||||
|
|
||||||
const CaptchaForm = sdk.getComponent("views.auth.CaptchaForm");
|
const CaptchaForm = sdk.getComponent("views.auth.CaptchaForm");
|
||||||
const sitePublicKey = this.props.stageParams.public_key;
|
let sitePublicKey;
|
||||||
|
if (!this.props.stageParams || !this.props.stageParams.public_key) {
|
||||||
|
errorText = _t(
|
||||||
|
"Missing captcha public key in homeserver configuration. Please report " +
|
||||||
|
"this to your homeserver administrator.",
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
sitePublicKey = this.props.stageParams.public_key;
|
||||||
|
}
|
||||||
|
|
||||||
let errorSection;
|
let errorSection;
|
||||||
if (this.props.errorText) {
|
if (errorText) {
|
||||||
errorSection = (
|
errorSection = (
|
||||||
<div className="error" role="alert">
|
<div className="error" role="alert">
|
||||||
{ this.props.errorText }
|
{ errorText }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1478,6 +1478,7 @@
|
|||||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use this app with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use this app with an existing Matrix account on a different homeserver.",
|
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use this app with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use this app with an existing Matrix account on a different homeserver.",
|
||||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.",
|
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.",
|
||||||
"To continue, please enter your password.": "To continue, please enter your password.",
|
"To continue, please enter your password.": "To continue, please enter your password.",
|
||||||
|
"Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator.": "Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator.",
|
||||||
"Please review and accept all of the homeserver's policies": "Please review and accept all of the homeserver's policies",
|
"Please review and accept all of the homeserver's policies": "Please review and accept all of the homeserver's policies",
|
||||||
"Please review and accept the policies of this homeserver:": "Please review and accept the policies of this homeserver:",
|
"Please review and accept the policies of this homeserver:": "Please review and accept the policies of this homeserver:",
|
||||||
"An email has been sent to %(emailAddress)s": "An email has been sent to %(emailAddress)s",
|
"An email has been sent to %(emailAddress)s": "An email has been sent to %(emailAddress)s",
|
||||||
|
Loading…
Reference in New Issue
Block a user