Skip to content

Commit

Permalink
Layout: Fix layout on /login
Browse files Browse the repository at this point in the history
  • Loading branch information
drewblaisdell committed Feb 2, 2016
1 parent 0bd07e0 commit ab288b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
5 changes: 4 additions & 1 deletion client/auth/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ import page from 'page';
/**
* Internal dependencies
*/
import { setSection } from 'state/ui/actions';
import LoginComponent from './login';
import * as OAuthToken from 'lib/oauth-token';

module.exports = {
login: function() {
login: function( context ) {
if ( OAuthToken.getToken() ) {
page( '/' );
} else {
context.store.dispatch( setSection( 'login', { hasSidebar: false } ) );

ReactDom.render(
React.createElement( LoginComponent, {} ),
document.getElementById( 'primary' )
Expand Down
32 changes: 18 additions & 14 deletions client/auth/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@
* Oauth login page, used in WordPress Desktop App
*/

html.is-desktop {
.logged-out-auth {
background: $blue-wordpress;

.wp-content {
margin: 0 auto;
overflow: hidden;
max-width: none;
padding-left: 0;
padding-right: 0;
}
.is-section-login {
background: $blue-wordpress;
height: 100%;

.wp-content:after {
content: none;
}
.wp-content {
height: 100%;
margin: 0 auto;
overflow: hidden;
max-width: none;
padding-left: 0;
padding-right: 0;
}

.wp-content:after {
content: none;
}

.wp-primary {
height: 100%;
}
}

Expand Down
4 changes: 4 additions & 0 deletions client/layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ Layout = React.createClass( {
},

renderMasterbar: function() {
if ( 'login' === this.props.section ) {
return null;
}

if ( ! this.props.user ) {
return <MasterbarMinimal url="/" />;
}
Expand Down

0 comments on commit ab288b7

Please sign in to comment.