mirror of
https://github.com/ascribe/onion.git
synced 2024-12-31 09:07:48 +01:00
Whitespace fix for comments
This commit is contained in:
parent
06ea23c627
commit
443be236f5
@ -29,7 +29,7 @@ let EditionContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object,
|
location: React.PropTypes.object,
|
||||||
params: React.PropTypes.object
|
params: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
@ -59,7 +59,7 @@ let PieceContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object,
|
location: React.PropTypes.object,
|
||||||
params: React.PropTypes.object
|
params: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
@ -33,7 +33,7 @@ let ContractSettings = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ let SettingsContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ let CoaVerifyContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ let ErrorNotFoundPage = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ let LoginContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ let LogoutContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ let PasswordResetContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ let PieceList = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ let RegisterPiece = React.createClass( {
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ let SignupContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ const PRLanding = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ const PRRegisterPiece = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: object
|
location: object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ let PrizePieceContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object,
|
location: React.PropTypes.object,
|
||||||
params: React.PropTypes.object
|
params: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
@ -19,7 +19,7 @@ let Landing = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ let LoginContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ let PrizePieceList = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ let PrizeRegisterPiece = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ let Settings = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ let SignupContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ const SluicePieceContainer = React.createClass({
|
|||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
whitelabel: React.PropTypes.object,
|
whitelabel: React.PropTypes.object,
|
||||||
|
|
||||||
//Provided from router
|
// Provided from router
|
||||||
location: React.PropTypes.object,
|
location: React.PropTypes.object,
|
||||||
params: React.PropTypes.object
|
params: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
@ -1,14 +1,20 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Header from '../../header';
|
|
||||||
import Footer from '../../footer';
|
|
||||||
|
|
||||||
import GlobalNotification from '../../global_notification';
|
|
||||||
|
|
||||||
import classNames from 'classnames';
|
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({
|
let WalletApp = React.createClass({
|
||||||
@ -21,21 +27,46 @@ let WalletApp = React.createClass({
|
|||||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
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() {
|
render() {
|
||||||
let header = null;
|
|
||||||
let subdomain = getSubdomain();
|
|
||||||
const { history, routes, children } = this.props;
|
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
|
// The second element of routes is always the active component object, where we can
|
||||||
// extract the path.
|
// extract the path.
|
||||||
let path = routes[1] ? routes[1].path : null;
|
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 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'))
|
if ((!path || history.isActive('/login') || history.isActive('/signup') || history.isActive('/contract_notifications'))
|
||||||
&& (['cyland', 'ikonotv', 'lumenus', '23vivi']).indexOf(subdomain) > -1) {
|
&& (['cyland', 'ikonotv', 'lumenus', '23vivi']).indexOf(subdomain) > -1) {
|
||||||
header = (<div className="hero"/>);
|
header = (<div className="hero"/>);
|
||||||
} else {
|
} else {
|
||||||
header = <Header routes={routes} />;
|
header = (<Header routes={routes} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
// In react-router 1.0, Routes have no 'name' property anymore. To keep functionality however,
|
// 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={classNames('ascribe-wallet-app', 'route--' + (path ? path.split('/')[0] : 'landing'))}>
|
||||||
<div className='container'>
|
<div className='container'>
|
||||||
{header}
|
{header}
|
||||||
{children}
|
<AppRouteWrapper
|
||||||
|
currentUser={currentUser}
|
||||||
|
whitelabel={whitelabel}>
|
||||||
|
{/* Routes are injected here */}
|
||||||
|
{children}
|
||||||
|
</AppRouteWrapper>
|
||||||
|
<Footer />
|
||||||
<GlobalNotification />
|
<GlobalNotification />
|
||||||
<div id="modal" className="container"></div>
|
<div id="modal" className="container"></div>
|
||||||
<Footer />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -48,7 +48,7 @@ import WalletApp from './wallet_app';
|
|||||||
let ROUTES = {
|
let ROUTES = {
|
||||||
'cyland': (
|
'cyland': (
|
||||||
<Route path='/' component={WalletApp}>
|
<Route path='/' component={WalletApp}>
|
||||||
<IndexRoute component={CylandLanding} />
|
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(CylandLanding)} />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
||||||
@ -118,7 +118,7 @@ let ROUTES = {
|
|||||||
),
|
),
|
||||||
'ikonotv': (
|
'ikonotv': (
|
||||||
<Route path='/' component={WalletApp}>
|
<Route path='/' component={WalletApp}>
|
||||||
<IndexRoute component={IkonotvLanding} />
|
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(IkonotvLanding)} />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
||||||
|
Loading…
Reference in New Issue
Block a user