2015-08-11 13:10:15 +02:00
|
|
|
import React from 'react';
|
2016-06-06 14:54:29 +02:00
|
|
|
import IndexRoute from 'react-router/es6/IndexRoute';
|
|
|
|
import Route from 'react-router/es6/Route';
|
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';
|
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-06-13 14:35:02 +02:00
|
|
|
import { getLangText } from '../../../utils/lang';
|
2016-02-08 14:50:24 +01:00
|
|
|
|
2015-08-11 13:10:15 +02:00
|
|
|
|
2016-06-03 17:52:38 +02:00
|
|
|
const ROUTES = {
|
2015-08-11 17:40:26 +02:00
|
|
|
'cyland': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
2016-02-05 10:38:59 +01:00
|
|
|
<IndexRoute
|
2016-06-03 17:52:38 +02:00
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(CylandLanding)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(CylandRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_wallet_submit" />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(CylandPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces" />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="editions/:editionId"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={EditionContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="coa_verify"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CoaVerifyContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="pieces/:pieceId"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CylandPieceContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
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': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
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
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(PieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces" />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="pieces/:pieceId"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={PieceContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="editions/:editionId"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={EditionContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="coa_verify"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CoaVerifyContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
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': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
2016-02-05 10:38:59 +01:00
|
|
|
<IndexRoute
|
2016-06-03 17:52:38 +02:00
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(IkonotvLanding)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="request_loan"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SendContractAgreementForm)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('SEND NEW CONTRACT')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_create_contractagreement" />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(IkonotvRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_wallet_submit" />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(IkonotvPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces" />
|
2015-10-12 16:51:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_notifications"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(IkonotvContractNotifications)} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="pieces/:pieceId"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={IkonotvPieceContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="editions/:editionId"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={EditionContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="coa_verify"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CoaVerifyContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
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': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
2016-02-05 10:38:59 +01:00
|
|
|
<IndexRoute
|
2016-06-03 17:52:38 +02:00
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LumenusLanding)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_wallet_submit" />
|
2015-10-21 14:10:21 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces" />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="pieces/:pieceId"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={MarketPieceContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="editions/:editionId"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={MarketEditionContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="coa_verify"
|
2016-03-04 15:53:55 +01:00
|
|
|
component={CoaVerifyContainer} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
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': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(Vivi23Landing)} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)}
|
2016-03-07 13:45:40 +01:00
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)}
|
2016-03-07 13:45:40 +01:00
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)}
|
2016-03-07 13:45:40 +01:00
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)}
|
2016-03-07 13:45:40 +01:00
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)}
|
2016-03-07 13:45:40 +01:00
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)}
|
2016-03-07 13:45:40 +01:00
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_wallet_submit"
|
2016-03-07 13:45:40 +01:00
|
|
|
footer={MarketFooter} />
|
2015-11-24 12:08:37 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(Vivi23PieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces"
|
2016-03-07 13:45:40 +01:00
|
|
|
footer={MarketFooter} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="pieces/:pieceId"
|
2016-03-07 13:45:40 +01:00
|
|
|
component={MarketPieceContainer}
|
|
|
|
footer={MarketFooter} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="editions/:editionId"
|
2016-03-07 13:45:40 +01:00
|
|
|
component={MarketEditionContainer}
|
|
|
|
footer={MarketFooter} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="coa_verify"
|
2016-03-07 13:45:40 +01:00
|
|
|
component={CoaVerifyContainer}
|
|
|
|
footer={MarketFooter} />
|
2016-02-05 10:38:59 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="*"
|
2016-03-07 13:45:40 +01:00
|
|
|
component={ErrorNotFoundPage}
|
|
|
|
footer={MarketFooter} />
|
2016-02-04 10:54:38 +01:00
|
|
|
</Route>
|
|
|
|
),
|
|
|
|
'polline': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PollineLanding)} />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_wallet_submit" />
|
2016-02-04 13:44:45 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces" />
|
|
|
|
<Route path="pieces/:pieceId" component={MarketPieceContainer} />
|
|
|
|
<Route path="editions/:editionId" component={MarketEditionContainer} />
|
|
|
|
<Route path="verify" component={CoaVerifyContainer} />
|
|
|
|
<Route path="*" component={ErrorNotFoundPage} />
|
2016-02-04 13:44:45 +01:00
|
|
|
</Route>
|
|
|
|
),
|
|
|
|
'artcity': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(ArtcityLanding)} />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
|
2016-02-24 11:16:56 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_wallet_submit" />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
|
2016-02-24 11:16:56 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces" />
|
|
|
|
<Route path="pieces/:pieceId" component={MarketPieceContainer} />
|
|
|
|
<Route path="editions/:editionId" component={MarketEditionContainer} />
|
|
|
|
<Route path="verify" component={CoaVerifyContainer} />
|
|
|
|
<Route path="*" component={ErrorNotFoundPage} />
|
2016-02-24 11:16:56 +01:00
|
|
|
</Route>
|
|
|
|
),
|
|
|
|
'demo': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(MarketLanding)} />
|
2016-04-06 16:22:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
|
2016-04-06 16:22:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
|
2016-04-06 16:22:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
|
2016-04-06 16:22:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
|
2016-04-06 16:22:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
|
2016-04-06 16:22:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
|
2016-04-06 16:22:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
|
2016-04-06 16:22:03 +02:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_wallet_submit" />
|
2016-04-06 16:22:03 +02:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
|
2016-04-06 16:22:03 +02:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces" />
|
|
|
|
<Route path="pieces/:pieceId" component={MarketPieceContainer} />
|
|
|
|
<Route path="editions/:editionId" component={MarketEditionContainer} />
|
|
|
|
<Route path="verify" component={CoaVerifyContainer} />
|
|
|
|
<Route path="*" component={ErrorNotFoundPage} />
|
2016-04-06 16:22:03 +02:00
|
|
|
</Route>
|
|
|
|
),
|
|
|
|
'liquidgallery': (
|
2016-06-03 17:52:38 +02:00
|
|
|
<Route path="/" component={WalletApp}>
|
|
|
|
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(MarketLanding)} />
|
2016-02-24 11:16:56 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="login"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="logout"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="signup"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="password_reset"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="contract_settings"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="register_piece"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('+ NEW WORK')}
|
2016-06-03 17:52:38 +02:00
|
|
|
aclName="acl_wallet_submit" />
|
2016-02-04 10:54:38 +01:00
|
|
|
<Route
|
2016-06-03 17:52:38 +02:00
|
|
|
path="collection"
|
|
|
|
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
|
2016-02-08 14:50:24 +01:00
|
|
|
headerTitle={getLangText('COLLECTION')}
|
2016-06-03 17:52:38 +02:00
|
|
|
disableOn="noPieces" />
|
|
|
|
<Route path="pieces/:pieceId" component={MarketPieceContainer} />
|
|
|
|
<Route path="editions/:editionId" component={MarketEditionContainer} />
|
|
|
|
<Route path="verify" component={CoaVerifyContainer} />
|
|
|
|
<Route path="*" component={ErrorNotFoundPage} />
|
2015-11-24 12:08:37 +01:00
|
|
|
</Route>
|
2015-08-11 17:40:26 +02:00
|
|
|
)
|
|
|
|
};
|
|
|
|
|
2016-06-03 17:52:38 +02:00
|
|
|
export default function getWalletRoutes(subdomain) {
|
|
|
|
if (subdomain in ROUTES) {
|
|
|
|
return (ROUTES[subdomain]);
|
2015-08-11 17:40:26 +02:00
|
|
|
} else {
|
2016-06-03 17:52:38 +02:00
|
|
|
throw new Error("Subdomain wasn't specified in the wallet app.");
|
2015-08-11 17:40:26 +02:00
|
|
|
}
|
2015-08-11 13:10:15 +02:00
|
|
|
}
|