1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Whitespace fix for comments

This commit is contained in:
Brett Sun 2016-01-11 16:26:36 +01:00
parent 06ea23c627
commit 443be236f5
24 changed files with 71 additions and 35 deletions

View File

@ -29,7 +29,7 @@ let EditionContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object,
params: React.PropTypes.object
},

View File

@ -59,7 +59,7 @@ let PieceContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object,
params: React.PropTypes.object
},

View File

@ -33,7 +33,7 @@ let ContractSettings = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -27,7 +27,7 @@ let SettingsContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -22,7 +22,7 @@ let CoaVerifyContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -13,7 +13,7 @@ let ErrorNotFoundPage = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -20,7 +20,7 @@ let LoginContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -17,7 +17,7 @@ let LogoutContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -20,7 +20,7 @@ let PasswordResetContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -48,7 +48,7 @@ let PieceList = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -36,7 +36,7 @@ let RegisterPiece = React.createClass( {
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -15,7 +15,7 @@ let SignupContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -20,7 +20,7 @@ const PRLanding = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -21,7 +21,7 @@ const PRRegisterPiece = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: object
},

View File

@ -56,7 +56,7 @@ let PrizePieceContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object,
params: React.PropTypes.object
},

View File

@ -19,7 +19,7 @@ let Landing = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -15,7 +15,7 @@ let LoginContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -21,7 +21,7 @@ let PrizePieceList = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -20,7 +20,7 @@ let PrizeRegisterPiece = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -31,7 +31,7 @@ let Settings = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -12,7 +12,7 @@ let SignupContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object
},

View File

@ -12,7 +12,7 @@ const SluicePieceContainer = React.createClass({
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
//Provided from router
// Provided from router
location: React.PropTypes.object,
params: React.PropTypes.object
},

View File

@ -1,14 +1,20 @@
'use strict';
import React from 'react';
import Header from '../../header';
import Footer from '../../footer';
import GlobalNotification from '../../global_notification';
import classNames from 'classnames';
import { getSubdomain } from '../../../utils/general_utils';
import UserStore from '../../../stores/user_store';
import UserActions from '../../../actions/user_actions';
import WhitelabelActions from '../../../actions/whitelabel_actions';
import WhitelabelStore from '../../../stores/whitelabel_store';
import AppRouteWrapper from '../../app_route_wrapper';
import Header from '../../header';
import Footer from '../../footer';
import GlobalNotification from '../../global_notification';
import { getSubdomain, mergeOptions } from '../../../utils/general_utils';
let WalletApp = React.createClass({
@ -21,21 +27,46 @@ let WalletApp = React.createClass({
routes: React.PropTypes.arrayOf(React.PropTypes.object)
},
getInitialState() {
return mergeOptions(
UserStore.getState(),
WhitelabelStore.getState()
);
},
componentDidMount() {
UserStore.listen(this.onChange);
WhitelabelStore.listen(this.onChange);
UserActions.fetchCurrentUser();
WhitelabelActions.fetchWhitelabel();
},
componentWillUnmount() {
UserStore.unlisten(this.onChange);
WhitelabelActions.unlisten(this.onChange);
},
onChange(state) {
this.setState(state);
},
render() {
let header = null;
let subdomain = getSubdomain();
const { history, routes, children } = this.props;
const { currentUser, whitelabel } = this.state;
const subdomain = getSubdomain();
// The second element of routes is always the active component object, where we can
// extract the path.
let path = routes[1] ? routes[1].path : null;
let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute
if ((!path || history.isActive('/login') || history.isActive('/signup') || history.isActive('/contract_notifications'))
&& (['cyland', 'ikonotv', 'lumenus', '23vivi']).indexOf(subdomain) > -1) {
header = (<div className="hero"/>);
} else {
header = <Header routes={routes} />;
header = (<Header routes={routes} />);
}
// In react-router 1.0, Routes have no 'name' property anymore. To keep functionality however,
@ -44,10 +75,15 @@ let WalletApp = React.createClass({
<div className={classNames('ascribe-wallet-app', 'route--' + (path ? path.split('/')[0] : 'landing'))}>
<div className='container'>
{header}
{children}
<AppRouteWrapper
currentUser={currentUser}
whitelabel={whitelabel}>
{/* Routes are injected here */}
{children}
</AppRouteWrapper>
<Footer />
<GlobalNotification />
<div id="modal" className="container"></div>
<Footer />
</div>
</div>
);

View File

@ -48,7 +48,7 @@ import WalletApp from './wallet_app';
let ROUTES = {
'cyland': (
<Route path='/' component={WalletApp}>
<IndexRoute component={CylandLanding} />
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(CylandLanding)} />
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
@ -118,7 +118,7 @@ let ROUTES = {
),
'ikonotv': (
<Route path='/' component={WalletApp}>
<IndexRoute component={IkonotvLanding} />
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(IkonotvLanding)} />
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />