hide header when error is up
This commit is contained in:
parent
adbea44d70
commit
67cc02df3b
1 changed files with 10 additions and 4 deletions
|
@ -354,6 +354,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
let serverConfig;
|
let serverConfig;
|
||||||
|
let header;
|
||||||
if (theme !== 'status') {
|
if (theme !== 'status') {
|
||||||
serverConfig = <ServerConfig ref="serverConfig"
|
serverConfig = <ServerConfig ref="serverConfig"
|
||||||
withToggleButton={true}
|
withToggleButton={true}
|
||||||
|
@ -363,6 +364,13 @@ module.exports = React.createClass({
|
||||||
defaultIsUrl={this.props.defaultIsUrl}
|
defaultIsUrl={this.props.defaultIsUrl}
|
||||||
onServerConfigChange={this.onServerConfigChange}
|
onServerConfigChange={this.onServerConfigChange}
|
||||||
delayTimeMs={1000} />;
|
delayTimeMs={1000} />;
|
||||||
|
|
||||||
|
header = <h2>{ _t('Sign in') }</h2>;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (!this.state.errorText) {
|
||||||
|
header = <h2>{ _t('Sign in to get started') }</h2>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -370,11 +378,9 @@ module.exports = React.createClass({
|
||||||
<div className="mx_Login_box">
|
<div className="mx_Login_box">
|
||||||
<LoginHeader />
|
<LoginHeader />
|
||||||
<div>
|
<div>
|
||||||
<h2>{ theme !== 'status' ? _t('Sign in') : _t('Sign in to get started') }
|
{ header }
|
||||||
{ loader }
|
|
||||||
</h2>
|
|
||||||
<div className="mx_Login_error">
|
<div className="mx_Login_error">
|
||||||
{ this.state.errorText }
|
{ this.state.errorText }
|
||||||
</div>
|
</div>
|
||||||
{ this.componentForStep(this.state.currentFlow) }
|
{ this.componentForStep(this.state.currentFlow) }
|
||||||
{ serverConfig }
|
{ serverConfig }
|
||||||
|
|
Loading…
Reference in a new issue