1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

add boilerplate code for wallet application

This commit is contained in:
Tim Daubenschütz 2015-08-11 13:10:15 +02:00
parent 95e0b256b6
commit f086bece71
3 changed files with 68 additions and 1 deletions

View File

@ -0,0 +1,26 @@
'use strict';
import React from 'react';
import Router from 'react-router';
import Header from '../../header';
// import Footer from '../../footer';
import GlobalNotification from '../../global_notification';
let RouteHandler = Router.RouteHandler;
let WalletApp = React.createClass({
render() {
return (
<div className="ascribe-prize-app">
<Header />
<div className="wp">
<RouteHandler />
</div>
<GlobalNotification />
<div id="modal" className="container"></div>
</div>
);
}
});
export default WalletApp;

View File

@ -0,0 +1,41 @@
'use strict';
import React from 'react';
import Router from 'react-router';
import LoginContainer from './components/login_container';
import LogoutContainer from '../../../components/logout_container';
import SignupContainer from './components/signup_container';
import PasswordResetContainer from '../../../components/password_reset_container';
import WalletRegisterPiece from './components/wallet_register_piece';
import PieceList from '../../piece_list';
import PieceContainer from '../../ascribe_detail/piece_container';
import EditionContainer from '../../ascribe_detail/edition_container';
import SettingsContainer from './components/settings_container';
import App from './app';
import AppConstants from '../../../constants/application_constants';
let Route = Router.Route;
let baseUrl = AppConstants.baseUrl;
function getRoutes() {
return (
<Route name="app" path={baseUrl} handler={App}>
<Route name="landing" path={baseUrl} handler={WalletRegisterPiece} />
<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="register_piece" path="register_piece" handler={WalletRegisterPiece} />
<Route name="pieces" path="collection" handler={PieceList} />
<Route name="piece" path="pieces/:pieceId" handler={PieceContainer} />
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
<Route name="settings" path="settings" handler={SettingsContainer} />
</Route>
);
}
export default getRoutes;

View File

@ -52,7 +52,7 @@ let constants = {
'name': 'Cyland media art lab',
'logo': 'https://s3-us-west-2.amazonaws.com/ascribe0/whitelabel/cyland/logo.gif',
'permissions': ['register', 'edit', 'share', 'del_from_collection'],
'type': 'prize'
'type': 'wallet'
}
],
'defaultDomain': {