Rename mx_Login_box to mx_AuthPage_modal and fold into AuthPage

This commit is contained in:
J. Ryan Stinnett 2019-01-21 18:49:28 -06:00
parent 3bd765f63f
commit 1d01ac398c
7 changed files with 46 additions and 52 deletions

View file

@ -15,14 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
.mx_Login_box {
width: 300px;
min-height: 450px;
padding-top: 50px;
padding-bottom: 50px;
margin: auto;
}
.mx_Login_support { .mx_Login_support {
text-align: center; text-align: center;
font-size: 13px; font-size: 13px;

View file

@ -30,3 +30,11 @@ limitations under the License.
margin-top: 32px; margin-top: 32px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.mx_AuthPage_modal {
width: 300px;
min-height: 450px;
padding-top: 50px;
padding-bottom: 50px;
margin: auto;
}

View file

@ -281,10 +281,8 @@ module.exports = React.createClass({
return ( return (
<AuthPage> <AuthPage>
<div className="mx_Login_box"> <AuthHeader />
<AuthHeader /> { resetPasswordJsx }
{ resetPasswordJsx }
</div>
</AuthPage> </AuthPage>
); );
}, },

View file

@ -559,20 +559,18 @@ module.exports = React.createClass({
return ( return (
<AuthPage> <AuthPage>
<div className="mx_Login_box"> <AuthHeader />
<AuthHeader /> <div>
<div> { header }
{ header } { errorTextSection }
{ errorTextSection } { this.componentForStep(this.state.currentFlow) }
{ this.componentForStep(this.state.currentFlow) } { serverConfig }
{ serverConfig } <a className="mx_Login_create" onClick={this.onRegisterClick} href="#">
<a className="mx_Login_create" onClick={this.onRegisterClick} href="#"> { _t('Create an account') }
{ _t('Create an account') } </a>
</a> { loginAsGuestJsx }
{ loginAsGuestJsx } <LanguageSelector />
<LanguageSelector /> <AuthFooter />
<AuthFooter />
</div>
</div> </div>
</AuthPage> </AuthPage>
); );

View file

@ -64,17 +64,15 @@ module.exports = React.createClass({
const AuthHeader = sdk.getComponent('auth.AuthHeader'); const AuthHeader = sdk.getComponent('auth.AuthHeader');
return ( return (
<AuthPage> <AuthPage>
<div className="mx_Login_box"> <AuthHeader />
<AuthHeader /> <div className="mx_Login_profile">
<div className="mx_Login_profile"> { _t('Set a display name:') }
{ _t('Set a display name:') } <ChangeDisplayName />
<ChangeDisplayName /> { _t('Upload an avatar:') }
{ _t('Upload an avatar:') } <ChangeAvatar
<ChangeAvatar initialAvatarUrl={this.state.avatarUrl} />
initialAvatarUrl={this.state.avatarUrl} /> <button onClick={this.props.onComplete}>{ _t('Continue') }</button>
<button onClick={this.props.onComplete}>{ _t('Continue') }</button> { this.state.errorString }
{ this.state.errorString }
</div>
</div> </div>
</AuthPage> </AuthPage>
); );

View file

@ -475,20 +475,18 @@ module.exports = React.createClass({
return ( return (
<AuthPage> <AuthPage>
<div className="mx_Login_box"> <AuthHeader
<AuthHeader icon={this.state.teamSelected ?
icon={this.state.teamSelected ? this.props.teamServerConfig.teamServerURL + "/static/common/" +
this.props.teamServerConfig.teamServerURL + "/static/common/" + this.state.teamSelected.domain + "/icon.png" :
this.state.teamSelected.domain + "/icon.png" : null}
null} />
/> { header }
{ header } { registerBody }
{ registerBody } { signIn }
{ signIn } { errorText }
{ errorText } <LanguageSelector />
<LanguageSelector /> <AuthFooter />
<AuthFooter />
</div>
</AuthPage> </AuthPage>
); );
}, },

View file

@ -25,7 +25,9 @@ module.exports = React.createClass({
render: function() { render: function() {
return ( return (
<div className="mx_AuthPage"> <div className="mx_AuthPage">
{ this.props.children } <div className="mx_AuthPage_modal">
{ this.props.children }
</div>
</div> </div>
); );
}, },