mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
refactoring of the general architecture
This commit is contained in:
parent
9d7a9bd028
commit
64d23f82df
@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
let IkonotvLanding = React.createClass({
|
||||
render() {
|
||||
return (
|
||||
<span>This is a landing page placeholder</span>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
export default IkonotvLanding;
|
@ -1,80 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import Router from 'react-router';
|
||||
|
||||
import WhitelabelActions from '../../../../../actions/whitelabel_actions';
|
||||
import WhitelabelStore from '../../../../../stores/whitelabel_store';
|
||||
|
||||
import PieceListStore from '../../../../../stores/piece_list_store';
|
||||
import PieceListActions from '../../../../../actions/piece_list_actions';
|
||||
|
||||
import UserStore from '../../../../../stores/user_store';
|
||||
import UserActions from '../../../../../actions/user_actions';
|
||||
|
||||
import PieceStore from '../../../../../stores/piece_store';
|
||||
import PieceActions from '../../../../../actions/piece_actions';
|
||||
|
||||
import ContractForm from './ascribe_forms/ikonotv_contract_form';
|
||||
import RegisterPieceForm from '../../../../../components/ascribe_forms/form_register_piece';
|
||||
import Property from '../../../../../components/ascribe_forms/property';
|
||||
import InputCheckbox from '../../../../../components/ascribe_forms/input_checkbox';
|
||||
|
||||
import GlobalNotificationModel from '../../../../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../../../../actions/global_notification_actions';
|
||||
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { mergeOptions } from '../../../../../utils/general_utils';
|
||||
|
||||
|
||||
let IkonotvRegisterPiece = React.createClass({
|
||||
|
||||
mixins: [Router.Navigation],
|
||||
|
||||
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);
|
||||
WhitelabelStore.unlisten(this.onChange);
|
||||
},
|
||||
|
||||
onChange(state) {
|
||||
this.setState(state);
|
||||
},
|
||||
|
||||
|
||||
render() {
|
||||
/* if (this.state.currentUser &&
|
||||
this.state.whitelabel &&
|
||||
this.state.whitelabel.user &&
|
||||
this.state.currentUser.email === this.state.whitelabel.user){
|
||||
return (
|
||||
<ContractForm />
|
||||
);
|
||||
} */
|
||||
return (
|
||||
<div className="ascribe-form-bordered ascribe-form-wrapper">
|
||||
<RegisterPieceForm
|
||||
enableLocalHashing={false}
|
||||
headerMessage={getLangText('Register your work')}
|
||||
submitMessage={getLangText('Register')}
|
||||
handleSuccess={this.handleRegisterSuccess}/>
|
||||
</div>
|
||||
);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
export default IkonotvRegisterPiece;
|
@ -12,13 +12,14 @@ import PieceList from '../../../components/piece_list';
|
||||
import PieceContainer from '../../../components/ascribe_detail/piece_container';
|
||||
import EditionContainer from '../../../components/ascribe_detail/edition_container';
|
||||
import SettingsContainer from '../../../components/settings_container';
|
||||
import RegisterPiece from '../../../components/register_piece';
|
||||
|
||||
// specific components
|
||||
import CylandLanding from './components/cyland/cyland_landing';
|
||||
import CylandPieceContainer from './components/cyland/ascribe_detail/cyland_piece_container';
|
||||
import CylandRegisterPiece from './components/cyland/cyland_register_piece';
|
||||
import CylandPieceList from './components/cyland/cyland_piece_list';
|
||||
|
||||
import IkonotvLanding from './components/ikonotv/ikonotv_landing';
|
||||
import IkonotvPieceList from './components/ikonotv/ikonotv_piece_list';
|
||||
import IkonotvRegisterPiece from './components/ikonotv/ikonotv_register_piece';
|
||||
import IkonotvRequestLoan from './components/ikonotv/ikonotv_request_loan';
|
||||
@ -65,13 +66,13 @@ let ROUTES = {
|
||||
),
|
||||
'ikonotv': (
|
||||
<Route name="app" path={baseUrl} handler={WalletApp}>
|
||||
<Route name="landing" path={baseUrl} handler={IkonotvRegisterPiece} />
|
||||
<Route name="landing" path={baseUrl} handler={IkonotvLanding} />
|
||||
<Route name="login" path="login" handler={LoginContainer} />
|
||||
<Route name="logout" path="logout" handler={LogoutContainer} />
|
||||
<Route name="signup" path="signup" handler={SignupContainer} />
|
||||
<Route name="password_reset" path="password_reset" handler={PasswordResetContainer} />
|
||||
<Route name="request_loan" path="request_loan" handler={IkonotvRequestLoan} headerTitle="SEND NEW CONTRACT" />
|
||||
<Route name="register_piece" path="register_piece" handler={IkonotvRegisterPiece} headerTitle="+ NEW WORK"/>
|
||||
<Route name="register_piece" path="register_piece" handler={RegisterPiece} headerTitle="+ NEW WORK"/>
|
||||
<Route name="pieces" path="collection" handler={IkonotvPieceList} headerTitle="COLLECTION"/>
|
||||
<Route name="piece" path="pieces/:pieceId" handler={CylandPieceContainer} />
|
||||
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
|
||||
|
Loading…
Reference in New Issue
Block a user