2016-10-03 14:44:27 +13:00
|
|
|
/**
|
|
|
|
|
* Base-level application wrapper
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
|
|
import React, { PropTypes } from 'react';
|
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
|
import { Provider } from 'react-redux'
|
|
|
|
|
import { createStore } from 'redux'
|
2016-10-23 23:48:06 +13:00
|
|
|
import { Router, Route, Link, IndexRoute, browserHistory } from 'react-router'
|
2016-10-03 14:44:27 +13:00
|
|
|
|
2016-10-03 15:22:15 +13:00
|
|
|
import store from './bootstrap.js'
|
2016-10-17 10:39:11 +13:00
|
|
|
|
2016-10-17 22:00:29 +13:00
|
|
|
require('../scss/app.scss');
|
|
|
|
|
|
2016-10-17 10:39:11 +13:00
|
|
|
import App from './views/App'
|
|
|
|
|
import Album from './views/Album'
|
|
|
|
|
import Artist from './views/Artist'
|
2016-10-21 09:56:07 +13:00
|
|
|
import Playlist from './views/Playlist'
|
2016-10-17 10:39:11 +13:00
|
|
|
import Queue from './views/Queue'
|
|
|
|
|
import Settings from './views/Settings'
|
2016-10-21 09:56:07 +13:00
|
|
|
|
2016-10-26 16:55:47 +13:00
|
|
|
import Discover from './views/discover/Discover'
|
|
|
|
|
import DiscoverFeatured from './views/discover/DiscoverFeatured'
|
|
|
|
|
import DiscoverCategories from './views/discover/DiscoverCategories'
|
|
|
|
|
import DiscoverCategory from './views/discover/DiscoverCategory'
|
2016-10-27 10:02:12 +13:00
|
|
|
import DiscoverNewReleases from './views/discover/DiscoverNewReleases'
|
2016-10-26 16:55:47 +13:00
|
|
|
|
2016-10-21 09:56:07 +13:00
|
|
|
import LibraryArtists from './views/library/LibraryArtists'
|
|
|
|
|
import LibraryAlbums from './views/library/LibraryAlbums'
|
|
|
|
|
import LibraryTracks from './views/library/LibraryTracks'
|
|
|
|
|
import LibraryPlaylists from './views/library/LibraryPlaylists'
|
2016-11-01 07:37:18 +13:00
|
|
|
import LibraryLocal from './views/library/LibraryLocal'
|
|
|
|
|
import LibraryLocalDirectory from './views/library/LibraryLocalDirectory'
|
2016-10-03 14:44:27 +13:00
|
|
|
|
|
|
|
|
ReactDOM.render(
|
2016-10-03 15:22:15 +13:00
|
|
|
<Provider store={store}>
|
2016-10-22 19:13:06 +13:00
|
|
|
<Router history={browserHistory}>
|
2016-10-03 14:44:27 +13:00
|
|
|
<Route path="/" component={App}>
|
2016-10-23 23:48:06 +13:00
|
|
|
|
|
|
|
|
<IndexRoute component={Queue} />
|
|
|
|
|
<Route path="/queue" component={Queue} />
|
2016-10-03 14:44:27 +13:00
|
|
|
|
2016-10-26 16:55:47 +13:00
|
|
|
<Route path="/discover" component={Discover} />
|
|
|
|
|
<Route path="/discover/featured" component={DiscoverFeatured} />
|
|
|
|
|
<Route path="/discover/categories" component={DiscoverCategories} />
|
|
|
|
|
<Route path="/discover/categories/:id" component={DiscoverCategory} />
|
2016-10-27 10:02:12 +13:00
|
|
|
<Route path="/discover/new-releases" component={DiscoverNewReleases} />
|
2016-10-26 16:55:47 +13:00
|
|
|
|
|
|
|
|
<Route path="/library/artists" component={LibraryArtists} />
|
|
|
|
|
<Route path="/library/albums" component={LibraryAlbums} />
|
|
|
|
|
<Route path="/library/tracks" component={LibraryTracks} />
|
|
|
|
|
<Route path="/library/playlists" component={LibraryPlaylists} />
|
2016-11-01 07:37:18 +13:00
|
|
|
<Route path="/library/local" component={LibraryLocal} />
|
|
|
|
|
<Route path="/library/local/directory/:uri" component={LibraryLocalDirectory} />
|
2016-10-21 09:56:07 +13:00
|
|
|
|
2016-10-26 16:55:47 +13:00
|
|
|
<Route path="/album/:uri" component={Album} />
|
|
|
|
|
<Route path="/artist/:uri" component={Artist} />
|
|
|
|
|
<Route path="/playlist/:uri" component={Playlist} />
|
|
|
|
|
<Route path="/settings" component={Settings} />
|
2016-10-03 14:44:27 +13:00
|
|
|
|
|
|
|
|
</Route>
|
|
|
|
|
</Router>
|
|
|
|
|
</Provider>,
|
|
|
|
|
document.getElementById('app')
|
|
|
|
|
);
|