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 1, 2016
1 parent 2ec8ece commit 9b8cb63
Show file tree
Hide file tree
Showing 3 changed files with 20 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
26 changes: 12 additions & 14 deletions client/auth/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@
* 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;

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

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

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 9b8cb63

Please sign in to comment.