2015-08-11 13:10:15 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
2015-10-01 15:57:46 +02:00
|
|
|
import { Route, IndexRoute } from 'react-router';
|
2015-08-11 13:10:15 +02:00
|
|
|
|
2016-02-08 14:50:24 +01:00
|
|
|
import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
|
|
|
|
|
|
|
|
// General components
|
2015-09-25 11:50:55 +02:00
|
|
|
import CoaVerifyContainer from '../../../components/coa_verify_container';
|
2015-08-11 14:47:28 +02:00
|
|
|
import LoginContainer from '../../../components/login_container';
|
2015-08-11 13:10:15 +02:00
|
|
|
import LogoutContainer from '../../../components/logout_container';
|
2015-08-11 14:47:28 +02:00
|
|
|
import SignupContainer from '../../../components/signup_container';
|
2015-08-11 13:10:15 +02:00
|
|
|
import PasswordResetContainer from '../../../components/password_reset_container';
|
2015-08-11 14:47:28 +02:00
|
|
|
import PieceList from '../../../components/piece_list';
|
|
|
|
import PieceContainer from '../../../components/ascribe_detail/piece_container';
|
|
|
|
import EditionContainer from '../../../components/ascribe_detail/edition_container';
|
2015-08-31 16:36:24 +02:00
|
|
|
import SettingsContainer from '../../../components/ascribe_settings/settings_container';
|
2015-09-23 15:16:46 +02:00
|
|
|
import ContractSettings from '../../../components/ascribe_settings/contract_settings';
|
2015-09-29 16:00:58 +02:00
|
|
|
import ErrorNotFoundPage from '../../../components/error_not_found_page';
|
2016-03-04 15:53:55 +01:00
|
|
|
import Footer from '../../../components/footer.js';
|
2015-11-24 12:04:08 +01:00
|
|
|
|
|
|
|
import CCRegisterPiece from './components/cc/cc_register_piece';
|
2015-08-11 13:10:15 +02:00
|
|
|
|
2015-08-19 09:31:36 +02:00
|
|
|
import CylandLanding from './components/cyland/cyland_landing';
|
2015-10-13 11:23:21 +02:00
|
|
|
import CylandPieceContainer from './components/cyland/cyland_detail/cyland_piece_container';
|
2015-08-12 09:30:24 +02:00
|
|
|
import CylandRegisterPiece from './components/cyland/cyland_register_piece';
|
2015-08-17 20:52:36 +02:00
|
|
|
import CylandPieceList from './components/cyland/cyland_piece_list';
|
|
|
|
|
2015-09-16 18:31:46 +02:00
|
|
|
import IkonotvLanding from './components/ikonotv/ikonotv_landing';
|
2015-08-18 12:36:38 +02:00
|
|
|
import IkonotvPieceList from './components/ikonotv/ikonotv_piece_list';
|
2015-12-03 15:22:37 +01:00
|
|
|
import SendContractAgreementForm from '../../../components/ascribe_forms/form_send_contract_agreement';
|
2015-09-15 13:15:29 +02:00
|
|
|
import IkonotvRegisterPiece from './components/ikonotv/ikonotv_register_piece';
|
2015-10-13 11:39:33 +02:00
|
|
|
import IkonotvPieceContainer from './components/ikonotv/ikonotv_detail/ikonotv_piece_container';
|
2015-09-04 11:49:55 +02:00
|
|
|
import IkonotvContractNotifications from './components/ikonotv/ikonotv_contract_notifications';
|
2015-08-18 12:36:38 +02:00
|
|
|
|
2016-04-06 16:22:03 +02:00
|
|
|
import MarketLanding from './components/market/market_landing';
|
2015-11-24 12:04:08 +01:00
|
|
|
import MarketPieceList from './components/market/market_piece_list';
|
|
|
|
import MarketRegisterPiece from './components/market/market_register_piece';
|
|
|
|
import MarketPieceContainer from './components/market/market_detail/market_piece_container';
|
|
|
|
import MarketEditionContainer from './components/market/market_detail/market_edition_container';
|
2016-03-07 13:45:40 +01:00
|
|
|
import MarketFooter from './components/market/market_footer';
|
2015-10-21 17:37:29 +02:00
|
|
|
|
2015-11-24 12:04:08 +01:00
|
|
|
import LumenusLanding from './components/lumenus/lumenus_landing';
|
2015-08-11 17:40:26 +02:00
|
|
|
|
2015-12-02 19:31:50 +01:00
|
|
|
import Vivi23Landing from './components/23vivi/23vivi_landing';
|
|
|
|
import Vivi23PieceList from './components/23vivi/23vivi_piece_list';
|
|
|
|
|
2016-02-04 10:54:38 +01:00
|
|
|
import PollineLanding from './components/polline/polline_landing';
|
|
|
|
|
2016-02-04 13:44:45 +01:00
|
|
|
import ArtcityLanding from './components/artcity/artcity_landing';
|
|
|
|
|
2015-08-11 14:47:28 +02:00
|
|
|
import WalletApp from './wallet_app';
|
2015-08-11 13:10:15 +02:00
|
|
|
|
2016-02-08 14:50:24 +01:00
|
|
|
import { getLangText } from '../../../utils/lang_utils';
|
|
|
|
|
2015-08-11 13:10:15 +02:00
|
|
|
|
2015-08-11 17:40:26 +02:00
|
|
|
let ROUTES = {
|
|
|
|
'cyland': (
|
2015-10-13 14:19:08 +02:00
|
|
|
<Route path='/' component={WalletApp}>
|
2016-02-05 10:38:59 +01:00
|
|
|
<IndexRoute
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(CylandLanding)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='login'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='logout'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='signup'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='password_reset'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='settings'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='register_piece'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-03-04 15:53:55 +01:00
|
|
|
aclName='acl_wallet_submit' />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='collection'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-03-04 15:53:55 +01:00
|
|
|
disableOn='noPieces' />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='editions/:editionId'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={EditionContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='coa_verify'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CoaVerifyContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='pieces/:pieceId'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CylandPieceContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='*'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ErrorNotFoundPage} />
|
2015-08-11 13:10:15 +02:00
|
|
|
</Route>
|
2015-08-11 17:40:26 +02:00
|
|
|
),
|
|
|
|
'cc': (
|
2015-10-13 14:19:08 +02:00
|
|
|
<Route path='/' component={WalletApp}>
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='login'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='logout'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='signup'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='password_reset'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='settings'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='register_piece'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CCRegisterPiece)}
|
2016-03-04 15:53:55 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='collection'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-03-04 15:53:55 +01:00
|
|
|
disableOn='noPieces' />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='pieces/:pieceId'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={PieceContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='editions/:editionId'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={EditionContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='coa_verify'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CoaVerifyContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='*'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ErrorNotFoundPage} />
|
2015-08-11 17:40:26 +02:00
|
|
|
</Route>
|
2015-08-18 12:08:01 +02:00
|
|
|
),
|
|
|
|
'ikonotv': (
|
2015-10-13 14:19:08 +02:00
|
|
|
<Route path='/' component={WalletApp}>
|
2016-02-05 10:38:59 +01:00
|
|
|
<IndexRoute
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(IkonotvLanding)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='login'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='logout'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='signup'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='password_reset'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='settings'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='request_loan'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SendContractAgreementForm)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('SEND NEW CONTRACT')}
|
2016-03-04 15:53:55 +01:00
|
|
|
aclName='acl_create_contractagreement' />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='register_piece'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-03-04 15:53:55 +01:00
|
|
|
aclName='acl_wallet_submit' />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='collection'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-03-04 15:53:55 +01:00
|
|
|
disableOn='noPieces' />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
|
|
|
path='contract_notifications'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='pieces/:pieceId'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={IkonotvPieceContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='editions/:editionId'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={EditionContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='coa_verify'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CoaVerifyContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='*'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ErrorNotFoundPage} />
|
2015-08-18 12:08:01 +02:00
|
|
|
</Route>
|
2015-10-21 14:10:21 +02:00
|
|
|
),
|
|
|
|
'lumenus': (
|
|
|
|
<Route path='/' component={WalletApp}>
|
2016-02-05 10:38:59 +01:00
|
|
|
<IndexRoute
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LumenusLanding)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
|
|
|
path='login'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
|
|
|
path='logout'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
|
|
|
path='signup'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
|
|
|
path='password_reset'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
|
|
|
path='settings'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
|
|
|
path='register_piece'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-03-04 15:53:55 +01:00
|
|
|
aclName='acl_wallet_submit' />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
|
|
|
path='collection'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-03-04 15:53:55 +01:00
|
|
|
disableOn='noPieces' />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='pieces/:pieceId'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={MarketPieceContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='editions/:editionId'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={MarketEditionContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='coa_verify'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CoaVerifyContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='*'
|
2016-03-04 15:53:55 +01:00
|
|
|
component={ErrorNotFoundPage} />
|
2015-10-21 14:10:21 +02:00
|
|
|
</Route>
|
2015-11-24 12:08:37 +01:00
|
|
|
),
|
|
|
|
'23vivi': (
|
|
|
|
<Route path='/' component={WalletApp}>
|
2016-03-04 15:53:55 +01:00
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
|
|
|
path='login'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
|
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
|
|
|
path='logout'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
|
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
|
|
|
path='signup'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
|
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
|
|
|
path='password_reset'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
|
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
|
|
|
path='settings'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
|
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
|
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
|
|
|
path='register_piece'
|
2015-12-08 11:17:04 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-03-07 13:45:40 +01:00
|
|
|
aclName='acl_wallet_submit'
|
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
|
|
|
path='collection'
|
2016-02-04 11:51:54 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-03-07 13:45:40 +01:00
|
|
|
disableOn='noPieces'
|
|
|
|
footer={MarketFooter} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='pieces/:pieceId'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={MarketPieceContainer}
|
|
|
|
footer={MarketFooter} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='editions/:editionId'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={MarketEditionContainer}
|
|
|
|
footer={MarketFooter} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='coa_verify'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={CoaVerifyContainer}
|
|
|
|
footer={MarketFooter} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
|
|
|
path='*'
|
2016-03-07 13:45:40 +01:00
|
|
|
component={ErrorNotFoundPage}
|
|
|
|
footer={MarketFooter} />
|
2016-02-04 10:54:38 +01:00
|
|
|
</Route>
|
|
|
|
),
|
|
|
|
'polline': (
|
|
|
|
<Route path='/' component={WalletApp}>
|
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PollineLanding)} />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
|
|
|
path='login'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
|
|
|
<Route
|
|
|
|
path='logout'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
|
|
|
<Route
|
|
|
|
path='signup'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
|
|
|
<Route
|
|
|
|
path='password_reset'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
|
|
|
<Route
|
|
|
|
path='settings'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
|
|
|
<Route
|
|
|
|
path='register_piece'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-02-04 13:44:45 +01:00
|
|
|
aclName='acl_wallet_submit' />
|
|
|
|
<Route
|
|
|
|
path='collection'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-02-04 13:44:45 +01:00
|
|
|
disableOn='noPieces' />
|
|
|
|
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
|
|
|
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
|
|
|
<Route path='verify' component={CoaVerifyContainer} />
|
|
|
|
<Route path='*' component={ErrorNotFoundPage} />
|
|
|
|
</Route>
|
|
|
|
),
|
|
|
|
'artcity': (
|
|
|
|
<Route path='/' component={WalletApp}>
|
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(ArtcityLanding)} />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
|
|
|
path='login'
|
2016-02-24 11:16:56 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
|
|
|
<Route
|
|
|
|
path='logout'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
|
|
|
<Route
|
|
|
|
path='signup'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
|
|
|
<Route
|
|
|
|
path='password_reset'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
|
|
|
<Route
|
|
|
|
path='settings'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
|
|
|
<Route
|
|
|
|
path='register_piece'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
|
|
|
aclName='acl_wallet_submit' />
|
|
|
|
<Route
|
|
|
|
path='collection'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
|
|
|
headerTitle={getLangText('COLLECTION')}
|
|
|
|
disableOn='noPieces' />
|
|
|
|
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
|
|
|
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
|
|
|
<Route path='verify' component={CoaVerifyContainer} />
|
|
|
|
<Route path='*' component={ErrorNotFoundPage} />
|
|
|
|
</Route>
|
|
|
|
),
|
|
|
|
'demo': (
|
|
|
|
<Route path='/' component={WalletApp}>
|
2016-04-06 16:22:03 +02:00
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(MarketLanding)} />
|
|
|
|
<Route
|
|
|
|
path='login'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
|
|
|
<Route
|
|
|
|
path='logout'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
|
|
|
<Route
|
|
|
|
path='signup'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
|
|
|
<Route
|
|
|
|
path='password_reset'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
|
|
|
<Route
|
|
|
|
path='settings'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
|
|
|
<Route
|
|
|
|
path='register_piece'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
|
|
|
aclName='acl_wallet_submit' />
|
|
|
|
<Route
|
|
|
|
path='collection'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
|
|
|
headerTitle={getLangText('COLLECTION')}
|
|
|
|
disableOn='noPieces' />
|
|
|
|
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
|
|
|
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
|
|
|
<Route path='verify' component={CoaVerifyContainer} />
|
|
|
|
<Route path='*' component={ErrorNotFoundPage} />
|
|
|
|
</Route>
|
|
|
|
),
|
|
|
|
'liquidgallery': (
|
|
|
|
<Route path='/' component={WalletApp}>
|
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(MarketLanding)} />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
|
|
|
path='login'
|
2016-02-04 10:54:38 +01:00
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
|
|
|
<Route
|
|
|
|
path='logout'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
|
|
|
<Route
|
|
|
|
path='signup'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
|
|
|
<Route
|
|
|
|
path='password_reset'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
|
|
|
<Route
|
|
|
|
path='settings'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
|
|
|
<Route
|
|
|
|
path='contract_settings'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
|
|
|
<Route
|
|
|
|
path='register_piece'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-02-04 10:54:38 +01:00
|
|
|
aclName='acl_wallet_submit' />
|
|
|
|
<Route
|
|
|
|
path='collection'
|
|
|
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-01-21 16:47:35 +01:00
|
|
|
disableOn='noPieces' />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
|
|
|
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
|
|
|
<Route path='verify' component={CoaVerifyContainer} />
|
|
|
|
<Route path='*' component={ErrorNotFoundPage} />
|
|
|
|
</Route>
|
2015-08-11 17:40:26 +02:00
|
|
|
)
|
|
|
|
};
|
|
|
|
|
|
|
|
function getRoutes(commonRoutes, subdomain) {
|
|
|
|
if(subdomain in ROUTES) {
|
|
|
|
return ROUTES[subdomain];
|
|
|
|
} else {
|
|
|
|
throw new Error('Subdomain wasn\'t specified in the wallet app.');
|
|
|
|
}
|
2015-08-11 13:10:15 +02:00
|
|
|
}
|
|
|
|
|
2015-10-12 16:51:03 +02:00
|
|
|
export default getRoutes;
|