Add modal look to authentication flows

This changes the auth screens to use the modal-like style of the redesign.

This does not attempt to style the actual body content of each screen.  Instead,
it covers the header area with logo, footer links, and overall modal container
only.
This commit is contained in:
J. Ryan Stinnett 2019-01-22 19:28:23 -06:00
parent 9d2bfdc0c0
commit 575cd1e37b
13 changed files with 113 additions and 42 deletions

View file

@ -185,7 +185,7 @@ module.exports = React.createClass({
render: function() {
const AuthPage = sdk.getComponent("auth.AuthPage");
const AuthHeader = sdk.getComponent("auth.AuthHeader");
const AuthFooter = sdk.getComponent("auth.AuthFooter");
const AuthBody = sdk.getComponent("auth.AuthBody");
const ServerConfig = sdk.getComponent("auth.ServerConfig");
const Spinner = sdk.getComponent("elements.Spinner");
@ -272,7 +272,6 @@ module.exports = React.createClass({
{ _t('Create an account') }
</a>
<LanguageSelector />
<AuthFooter />
</div>
</div>
);
@ -282,7 +281,9 @@ module.exports = React.createClass({
return (
<AuthPage>
<AuthHeader />
{ resetPasswordJsx }
<AuthBody>
{resetPasswordJsx}
</AuthBody>
</AuthPage>
);
},

View file

@ -517,7 +517,7 @@ module.exports = React.createClass({
const Loader = sdk.getComponent("elements.Spinner");
const AuthPage = sdk.getComponent("auth.AuthPage");
const AuthHeader = sdk.getComponent("auth.AuthHeader");
const AuthFooter = sdk.getComponent("auth.AuthFooter");
const AuthBody = sdk.getComponent("auth.AuthBody");
const ServerConfig = sdk.getComponent("auth.ServerConfig");
const loader = this.state.busy ? <div className="mx_Login_loader"><Loader /></div> : null;
@ -560,7 +560,7 @@ module.exports = React.createClass({
return (
<AuthPage>
<AuthHeader />
<div>
<AuthBody>
{ header }
{ errorTextSection }
{ this.componentForStep(this.state.currentFlow) }
@ -570,8 +570,7 @@ module.exports = React.createClass({
</a>
{ loginAsGuestJsx }
<LanguageSelector />
<AuthFooter />
</div>
</AuthBody>
</AuthPage>
);
},

View file

@ -62,18 +62,21 @@ module.exports = React.createClass({
const ChangeAvatar = sdk.getComponent('settings.ChangeAvatar');
const AuthPage = sdk.getComponent('auth.AuthPage');
const AuthHeader = sdk.getComponent('auth.AuthHeader');
const AuthBody = sdk.getComponent("auth.AuthBody");
return (
<AuthPage>
<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>
<AuthBody>
<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>
</AuthBody>
</AuthPage>
);
},

View file

@ -397,7 +397,7 @@ module.exports = React.createClass({
render: function() {
const AuthHeader = sdk.getComponent('auth.AuthHeader');
const AuthFooter = sdk.getComponent('auth.AuthFooter');
const AuthBody = sdk.getComponent("auth.AuthBody");
const AuthPage = sdk.getComponent('auth.AuthPage');
const InteractiveAuth = sdk.getComponent('structures.InteractiveAuth');
const Spinner = sdk.getComponent("elements.Spinner");
@ -481,12 +481,13 @@ module.exports = React.createClass({
this.state.teamSelected.domain + "/icon.png" :
null}
/>
{ header }
{ registerBody }
{ signIn }
{ errorText }
<LanguageSelector />
<AuthFooter />
<AuthBody>
{ header }
{ registerBody }
{ signIn }
{ errorText }
<LanguageSelector />
</AuthBody>
</AuthPage>
);
},