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.
*/
.mx_Login_box {
width: 300px;
min-height: 450px;
padding-top: 50px;
padding-bottom: 50px;
margin: auto;
}
.mx_Login_support {
text-align: center;
font-size: 13px;

View file

@ -30,3 +30,11 @@ limitations under the License.
margin-top: 32px;
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 (
<AuthPage>
<div className="mx_Login_box">
<AuthHeader />
{ resetPasswordJsx }
</div>
<AuthHeader />
{ resetPasswordJsx }
</AuthPage>
);
},

View file

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

View file

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

View file

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

View file

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