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

Add footer property to Route

This commit is contained in:
Tim Daubenschütz 2016-03-04 15:53:55 +01:00
parent 66e4591a56
commit 1c94ecc177
8 changed files with 128 additions and 202 deletions

View File

@ -21,6 +21,7 @@ let AscribeApp = React.createClass({
render() { render() {
const { activeRoute, children, currentUser, routes, whitelabel } = this.props; const { activeRoute, children, currentUser, routes, whitelabel } = this.props;
const Footer = activeRoute && activeRoute.footer;
return ( return (
<div className="ascribe-app ascribe-default-app"> <div className="ascribe-app ascribe-default-app">
@ -34,7 +35,7 @@ let AscribeApp = React.createClass({
{/* Routes are injected here */} {/* Routes are injected here */}
{children} {children}
</AppRouteWrapper> </AppRouteWrapper>
<Footer activeRoute={activeRoute} /> {Footer ? <Footer /> : null}
</div> </div>
); );
} }

View File

@ -4,13 +4,10 @@ import React from 'react';
import { getLangText } from '../utils/lang_utils'; import { getLangText } from '../utils/lang_utils';
let Footer = React.createClass({
propTypes: {
activeRoute: React.PropTypes.object.isRequired
},
const Footer = React.createClass({
render() { render() {
return !this.props.activeRoute.hideFooter ? ( return (
<div className="ascribe-footer hidden-print"> <div className="ascribe-footer hidden-print">
<p className="ascribe-sub-sub-statement"> <p className="ascribe-sub-sub-statement">
<br /> <br />
@ -28,7 +25,7 @@ let Footer = React.createClass({
<a href="https://www.linkedin.com/company/4816284?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A122827941425632318075%2CVSRPtargetId%3A4816284%2CVSRPcmpt%3Aprimary" className="social social-linked-in" target="_blank"></a> <a href="https://www.linkedin.com/company/4816284?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A122827941425632318075%2CVSRPtargetId%3A4816284%2CVSRPcmpt%3Aprimary" className="social social-linked-in" target="_blank"></a>
</p> </p>
</div> </div>
) : null; );
} }
}); });

View File

@ -35,6 +35,7 @@ let PRApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props; const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain(); const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path; const path = activeRoute && activeRoute.path;
const Footer = activeRoute && activeRoute.footer;
let style = {}; let style = {};
let header; let header;
@ -64,7 +65,7 @@ let PRApp = React.createClass({
{/* Routes are injected here */} {/* Routes are injected here */}
{children} {children}
</AppRouteWrapper> </AppRouteWrapper>
<Footer activeRoute={activeRoute} /> {Footer ? <Footer /> : null}
</div> </div>
); );
} }

View File

@ -35,115 +35,91 @@ const ROUTES = {
sluice: ( sluice: (
<Route path='/' component={SPApp}> <Route path='/' component={SPApp}>
<IndexRoute <IndexRoute
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLanding)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLanding)} />
hideFooter />
<Route <Route
path='login' path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLoginContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLoginContainer)} />
hideFooter />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
hideFooter />
<Route <Route
path='signup' path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPSignupContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPSignupContainer)} />
hideFooter />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
hideFooter />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)} />
hideFooter />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPRegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} headerTitle={getLangText('+ NEW WORK')} />
hideFooter />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
headerTitle={getLangText('COLLECTION')} headerTitle={getLangText('COLLECTION')} />
hideFooter />
<Route <Route
path='pieces/:pieceId' path='pieces/:pieceId'
component={SluicePieceContainer} component={SluicePieceContainer} />
hideFooter />
<Route <Route
path='editions/:editionId' path='editions/:editionId'
component={EditionContainer} component={EditionContainer} />
hideFooter />
<Route <Route
path='coa_verify' path='coa_verify'
component={CoaVerifyContainer} component={CoaVerifyContainer} />
hideFooter />
<Route <Route
path='*' path='*'
component={ErrorNotFoundPage} component={ErrorNotFoundPage} />
hideFooter />
</Route> </Route>
), ),
portfolioreview: ( portfolioreview: (
<Route path='/' component={PRApp}> <Route path='/' component={PRApp}>
<IndexRoute <IndexRoute
component={ProxyHandler(AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }))(PRLanding)} component={ProxyHandler(AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }))(PRLanding)} />
hideFooter />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)} />
hideFooter />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
headerTitle={getLangText('SUBMISSIONS')} headerTitle={getLangText('SUBMISSIONS')} />
hideFooter />
<Route <Route
path='login' path='login'
component={ProxyHandler( component={ProxyHandler(
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }), AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
AuthRedirect({to: '/register_piece', when: 'loggedIn'}) AuthRedirect({to: '/register_piece', when: 'loggedIn'})
)(SPLoginContainer)} )(SPLoginContainer)} />
hideFooter />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
hideFooter />
<Route <Route
path='signup' path='signup'
component={ProxyHandler( component={ProxyHandler(
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }), AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
AuthRedirect({to: '/register_piece', when: 'loggedIn'}) AuthRedirect({to: '/register_piece', when: 'loggedIn'})
)(SPSignupContainer)} )(SPSignupContainer)} />
hideFooter />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler( component={ProxyHandler(
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }), AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
AuthRedirect({to: '/register_piece', when: 'loggedIn'}) AuthRedirect({to: '/register_piece', when: 'loggedIn'})
)(PasswordResetContainer)} )(PasswordResetContainer)} />
hideFooter />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)} />
hideFooter />
<Route <Route
path='pieces/:pieceId' path='pieces/:pieceId'
component={SPPieceContainer} component={SPPieceContainer} />
hideFooter />
<Route <Route
path='editions/:editionId' path='editions/:editionId'
component={EditionContainer} component={EditionContainer} />
hideFooter />
<Route <Route
path='coa_verify' path='coa_verify'
component={CoaVerifyContainer} component={CoaVerifyContainer} />
hideFooter />
<Route <Route
path='*' path='*'
component={ErrorNotFoundPage} component={ErrorNotFoundPage} />
hideFooter />
</Route> </Route>
) )
}; };

View File

@ -29,6 +29,7 @@ let PrizeApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props; const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain(); const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path; const path = activeRoute && activeRoute.path;
const Footer = activeRoute && activeRoute.footer;
let header = 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
@ -52,7 +53,7 @@ let PrizeApp = React.createClass({
{/* Routes are injected here */} {/* Routes are injected here */}
{children} {children}
</AppRouteWrapper> </AppRouteWrapper>
<Footer activeRoute={activeRoute} /> {Footer ? <Footer /> : null}
</div> </div>
); );
} }

View File

@ -27,6 +27,7 @@ let WalletApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props; const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain(); const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path; const path = activeRoute && activeRoute.path;
const Footer = activeRoute && activeRoute.footer;
let header = 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
@ -53,7 +54,7 @@ let WalletApp = React.createClass({
{/* Routes are injected here */} {/* Routes are injected here */}
{children} {children}
</AppRouteWrapper> </AppRouteWrapper>
<Footer activeRoute={activeRoute} /> {Footer ? <Footer /> : null}
</div> </div>
); );
} }

View File

@ -17,6 +17,7 @@ import EditionContainer from '../../../components/ascribe_detail/edition_contain
import SettingsContainer from '../../../components/ascribe_settings/settings_container'; import SettingsContainer from '../../../components/ascribe_settings/settings_container';
import ContractSettings from '../../../components/ascribe_settings/contract_settings'; import ContractSettings from '../../../components/ascribe_settings/contract_settings';
import ErrorNotFoundPage from '../../../components/error_not_found_page'; import ErrorNotFoundPage from '../../../components/error_not_found_page';
import Footer from '../../../components/footer.js';
import CCRegisterPiece from './components/cc/cc_register_piece'; import CCRegisterPiece from './components/cc/cc_register_piece';
@ -57,301 +58,235 @@ let ROUTES = {
'cyland': ( 'cyland': (
<Route path='/' component={WalletApp}> <Route path='/' component={WalletApp}>
<IndexRoute <IndexRoute
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(CylandLanding)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(CylandLanding)} />
hideFooter />
<Route <Route
path='login' path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
hideFooter />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
hideFooter />
<Route <Route
path='signup' path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
hideFooter />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
hideFooter />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
hideFooter />
<Route <Route
path='contract_settings' path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
hideFooter />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandRegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit' aclName='acl_wallet_submit' />
hideFooter />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)}
headerTitle={getLangText('COLLECTION')} headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' disableOn='noPieces' />
hideFooter />
<Route <Route
path='editions/:editionId' path='editions/:editionId'
component={EditionContainer} component={EditionContainer} />
hideFooter />
<Route <Route
path='coa_verify' path='coa_verify'
component={CoaVerifyContainer} component={CoaVerifyContainer} />
hideFooter />
<Route <Route
path='pieces/:pieceId' path='pieces/:pieceId'
component={CylandPieceContainer} component={CylandPieceContainer} />
hideFooter />
<Route <Route
path='*' path='*'
component={ErrorNotFoundPage} component={ErrorNotFoundPage} />
hideFooter />
</Route> </Route>
), ),
'cc': ( 'cc': (
<Route path='/' component={WalletApp}> <Route path='/' component={WalletApp}>
<Route <Route
path='login' path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
hideFooter />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
hideFooter />
<Route <Route
path='signup' path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
hideFooter />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
hideFooter />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
hideFooter />
<Route <Route
path='contract_settings' path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
hideFooter />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CCRegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CCRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} headerTitle={getLangText('+ NEW WORK')} />
hideFooter />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
headerTitle={getLangText('COLLECTION')} headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' disableOn='noPieces' />
hideFooter />
<Route <Route
path='pieces/:pieceId' path='pieces/:pieceId'
component={PieceContainer} component={PieceContainer} />
hideFooter />
<Route <Route
path='editions/:editionId' path='editions/:editionId'
component={EditionContainer} component={EditionContainer} />
hideFooter />
<Route <Route
path='coa_verify' path='coa_verify'
component={CoaVerifyContainer} component={CoaVerifyContainer} />
hideFooter />
<Route <Route
path='*' path='*'
component={ErrorNotFoundPage} component={ErrorNotFoundPage} />
hideFooter />
</Route> </Route>
), ),
'ikonotv': ( 'ikonotv': (
<Route path='/' component={WalletApp}> <Route path='/' component={WalletApp}>
<IndexRoute <IndexRoute
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(IkonotvLanding)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(IkonotvLanding)} />
hideFooter />
<Route <Route
path='login' path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
hideFooter />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
hideFooter />
<Route <Route
path='signup' path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
hideFooter />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
hideFooter />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
hideFooter />
<Route <Route
path='contract_settings' path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
hideFooter />
<Route <Route
path='request_loan' path='request_loan'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SendContractAgreementForm)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SendContractAgreementForm)}
headerTitle={getLangText('SEND NEW CONTRACT')} headerTitle={getLangText('SEND NEW CONTRACT')}
aclName='acl_create_contractagreement' aclName='acl_create_contractagreement' />
hideFooter />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvRegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit' aclName='acl_wallet_submit' />
hideFooter />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvPieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvPieceList)}
headerTitle={getLangText('COLLECTION')} headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' disableOn='noPieces' />
hideFooter />
<Route <Route
path='contract_notifications' path='contract_notifications'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} />
hideFooter />
<Route <Route
path='pieces/:pieceId' path='pieces/:pieceId'
component={IkonotvPieceContainer} component={IkonotvPieceContainer} />
hideFooter />
<Route <Route
path='editions/:editionId' path='editions/:editionId'
component={EditionContainer} component={EditionContainer} />
hideFooter />
<Route <Route
path='coa_verify' path='coa_verify'
component={CoaVerifyContainer} component={CoaVerifyContainer} />
hideFooter />
<Route <Route
path='*' path='*'
component={ErrorNotFoundPage} component={ErrorNotFoundPage} />
hideFooter />
</Route> </Route>
), ),
'lumenus': ( 'lumenus': (
<Route path='/' component={WalletApp}> <Route path='/' component={WalletApp}>
<IndexRoute <IndexRoute
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LumenusLanding)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LumenusLanding)} />
hideFooter />
<Route <Route
path='login' path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
hideFooter />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
hideFooter />
<Route <Route
path='signup' path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
hideFooter />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
hideFooter />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
hideFooter />
<Route <Route
path='contract_settings' path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
hideFooter />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit' aclName='acl_wallet_submit' />
hideFooter />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
headerTitle={getLangText('COLLECTION')} headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' disableOn='noPieces' />
hideFooter />
<Route <Route
path='pieces/:pieceId' path='pieces/:pieceId'
component={MarketPieceContainer} component={MarketPieceContainer} />
hideFooter />
<Route <Route
path='editions/:editionId' path='editions/:editionId'
component={MarketEditionContainer} component={MarketEditionContainer} />
hideFooter />
<Route <Route
path='coa_verify' path='coa_verify'
component={CoaVerifyContainer} component={CoaVerifyContainer} />
hideFooter />
<Route <Route
path='*' path='*'
component={ErrorNotFoundPage} component={ErrorNotFoundPage} />
hideFooter />
</Route> </Route>
), ),
'23vivi': ( '23vivi': (
<Route path='/' component={WalletApp}> <Route path='/' component={WalletApp}>
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)} <IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)} />
hideFooter />
<Route <Route
path='login' path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
hideFooter />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
hideFooter />
<Route <Route
path='signup' path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
hideFooter />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
hideFooter />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
hideFooter />
<Route <Route
path='contract_settings' path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
hideFooter />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit' aclName='acl_wallet_submit' />
hideFooter />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)}
headerTitle={getLangText('COLLECTION')} headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' disableOn='noPieces' />
hideFooter />
<Route <Route
path='pieces/:pieceId' path='pieces/:pieceId'
component={MarketPieceContainer} component={MarketPieceContainer} />
hideFooter />
<Route <Route
path='editions/:editionId' path='editions/:editionId'
component={MarketEditionContainer} component={MarketEditionContainer} />
hideFooter />
<Route <Route
path='coa_verify' path='coa_verify'
component={CoaVerifyContainer} component={CoaVerifyContainer} />
hideFooter />
<Route <Route
path='*' path='*'
component={ErrorNotFoundPage} component={ErrorNotFoundPage} />
hideFooter />
</Route> </Route>
), ),
'polline': ( 'polline': (

View File

@ -25,6 +25,8 @@ import ErrorNotFoundPage from './components/error_not_found_page';
import RegisterPiece from './components/register_piece'; import RegisterPiece from './components/register_piece';
import Footer from './components/footer';
import { ProxyHandler, AuthRedirect } from './components/ascribe_routes/proxy_handler'; import { ProxyHandler, AuthRedirect } from './components/ascribe_routes/proxy_handler';
import { getLangText } from './utils/lang_utils'; import { getLangText } from './utils/lang_utils';
@ -34,35 +36,47 @@ const COMMON_ROUTES = (
<Route path='/' component={AscribeApp}> <Route path='/' component={AscribeApp}>
<Route <Route
path='login' path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} /> component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
footer={Footer} />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(RegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(RegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} /> headerTitle={getLangText('+ NEW WORK')}
footer={Footer} />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
headerTitle={getLangText('COLLECTION')} headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' /> disableOn='noPieces'
footer={Footer} />
<Route <Route
path='signup' path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} /> component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
footer={Footer} />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(LogoutContainer)}/> component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(LogoutContainer)}
<Route path='pieces/:pieceId' component={PieceContainer} /> footer={Footer} />
<Route path='editions/:editionId' component={EditionContainer} /> <Route path='pieces/:pieceId' component={PieceContainer}
footer={Footer} />
<Route path='editions/:editionId' component={EditionContainer}
footer={Footer} />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} /> component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
footer={Footer} />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} /> component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
footer={Footer} />
<Route <Route
path='contract_settings' path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} /> component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
<Route path='coa_verify' component={CoaVerifyContainer} /> footer={Footer} />
<Route path='*' component={ErrorNotFoundPage} /> <Route path='coa_verify' component={CoaVerifyContainer}
footer={Footer} />
<Route path='*' component={ErrorNotFoundPage}
footer={Footer} />
</Route> </Route>
); );