From 64d23f82dffae7fdd92f2028c00810ba68f6cd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 27 Aug 2015 14:47:33 +0200 Subject: [PATCH] refactoring of the general architecture --- .../components/ikonotv/ikonotv_landing.js | 13 +++ .../ikonotv/ikonotv_register_piece.js | 80 ------------------- .../whitelabel/wallet/wallet_routes.js | 7 +- 3 files changed, 17 insertions(+), 83 deletions(-) create mode 100644 js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js delete mode 100644 js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js new file mode 100644 index 00000000..9893da0d --- /dev/null +++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js @@ -0,0 +1,13 @@ +'use strict'; + +import React from 'react'; + +let IkonotvLanding = React.createClass({ + render() { + return ( + This is a landing page placeholder + ); + } +}); + +export default IkonotvLanding; \ No newline at end of file diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js deleted file mode 100644 index 814b0f01..00000000 --- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js +++ /dev/null @@ -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 ( - - ); - } */ - return ( -
- -
- ); - - } -}); - - -export default IkonotvRegisterPiece; diff --git a/js/components/whitelabel/wallet/wallet_routes.js b/js/components/whitelabel/wallet/wallet_routes.js index a315bf3d..133d66ac 100644 --- a/js/components/whitelabel/wallet/wallet_routes.js +++ b/js/components/whitelabel/wallet/wallet_routes.js @@ -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': ( - + - +