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-12-21 21:49:20 +13:00
|
|
|
import { Router, Route, Link, IndexRoute, hashHistory } from 'react-router'
|
2016-10-03 14:44:27 +13:00
|
|
|
|
2018-07-08 21:12:18 +12:00
|
|
|
import store from './bootstrap.js';
|
2016-10-17 22:00:29 +13:00
|
|
|
require('../scss/app.scss');
|
|
|
|
|
|
2018-07-08 21:12:18 +12:00
|
|
|
import App from './App';
|
|
|
|
|
import Album from './views/Album';
|
|
|
|
|
import Artist from './views/Artist';
|
|
|
|
|
import Playlist from './views/Playlist';
|
|
|
|
|
import User from './views/User';
|
|
|
|
|
import Track from './views/Track';
|
|
|
|
|
import Queue from './views/Queue';
|
|
|
|
|
import QueueHistory from './views/QueueHistory';
|
|
|
|
|
import Debug from './views/Debug';
|
|
|
|
|
import Search from './views/Search';
|
|
|
|
|
import Settings from './views/Settings';
|
2016-10-21 09:56:07 +13:00
|
|
|
|
2018-07-08 21:12:18 +12:00
|
|
|
import DiscoverRecommendations from './views/discover/DiscoverRecommendations';
|
|
|
|
|
import DiscoverFeatured from './views/discover/DiscoverFeatured';
|
|
|
|
|
import DiscoverCategories from './views/discover/DiscoverCategories';
|
|
|
|
|
import DiscoverCategory from './views/discover/DiscoverCategory';
|
|
|
|
|
import DiscoverNewReleases from './views/discover/DiscoverNewReleases';
|
2016-10-26 16:55:47 +13:00
|
|
|
|
2018-07-08 21:12:18 +12: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';
|
|
|
|
|
import LibraryBrowse from './views/library/LibraryBrowse';
|
|
|
|
|
|
|
|
|
|
import EditPlaylist from './views/modals/EditPlaylist';
|
2018-07-09 19:09:12 +12:00
|
|
|
import CreatePlaylist from './views/modals/CreatePlaylist';
|
|
|
|
|
import EditRadio from './views/modals/EditRadio';
|
|
|
|
|
import AddToQueue from './views/modals/AddToQueue';
|
2018-07-10 16:57:06 +12:00
|
|
|
import InitialSetup from './views/modals/InitialSetup';
|
2018-07-13 16:48:41 +12:00
|
|
|
import KioskMode from './views/modals/KioskMode';
|
2018-09-30 20:09:12 +13:00
|
|
|
import ShareConfiguration from './views/modals/ShareConfiguration';
|
2018-07-21 15:43:01 +12:00
|
|
|
import AddToPlaylist from './views/modals/AddToPlaylist';
|
2018-08-27 21:17:36 +12:00
|
|
|
import ImageZoom from './views/modals/ImageZoom';
|
2018-10-09 21:39:38 +13:00
|
|
|
import EditCommand from './views/modals/EditCommand';
|
2016-10-03 14:44:27 +13:00
|
|
|
|
2018-07-08 21:12:18 +12:00
|
|
|
global.baseURL = '/';
|
2016-12-21 15:24:07 +13:00
|
|
|
|
2016-10-03 14:44:27 +13:00
|
|
|
ReactDOM.render(
|
2016-10-03 15:22:15 +13:00
|
|
|
<Provider store={store}>
|
2018-06-05 13:43:02 +12:00
|
|
|
<Router history={hashHistory}>
|
2016-12-21 15:24:07 +13:00
|
|
|
<Route path={global.baseURL} component={App}>
|
2016-10-23 23:48:06 +13:00
|
|
|
|
2018-07-10 16:57:06 +12:00
|
|
|
<IndexRoute component={Queue} />
|
|
|
|
|
|
|
|
|
|
<Route path="initial-setup" component={InitialSetup} />
|
2018-07-13 16:48:41 +12:00
|
|
|
<Route path="kiosk-mode" component={KioskMode} />
|
2018-07-21 15:43:01 +12:00
|
|
|
<Route path="add-to-playlist/:uris" component={AddToPlaylist} />
|
2018-08-27 21:17:36 +12:00
|
|
|
<Route path="image-zoom" component={ImageZoom} />
|
2018-09-30 20:09:12 +13:00
|
|
|
<Route path="share-configuration" component={ShareConfiguration} />
|
2018-10-09 21:39:38 +13:00
|
|
|
<Route path="edit-command(/:id)" component={EditCommand} />
|
2018-07-10 16:57:06 +12:00
|
|
|
|
2016-11-01 16:41:04 +13:00
|
|
|
<Route path="queue" component={Queue} />
|
2017-05-31 09:06:42 +12:00
|
|
|
<Route path="queue/history" component={QueueHistory} />
|
2018-07-09 19:09:12 +12:00
|
|
|
<Route path="queue/radio" component={EditRadio} />
|
|
|
|
|
<Route path="queue/add-uri" component={AddToQueue} />
|
2017-05-31 09:06:42 +12:00
|
|
|
<Route path="settings/debug" component={Debug} />
|
2018-04-03 17:01:40 +12:00
|
|
|
<Route path="settings(/service/:sub_view)" component={Settings} />
|
2016-11-06 15:47:37 +13:00
|
|
|
|
2018-08-14 21:25:55 +12:00
|
|
|
<Route path="search(/:type/:term)" component={Search} />
|
2016-11-06 15:47:37 +13:00
|
|
|
<Route path="album/:uri" component={Album} />
|
2017-05-05 04:50:22 +12:00
|
|
|
<Route path="artist/:uri(/:sub_view)" component={Artist} />
|
2018-07-09 19:09:12 +12:00
|
|
|
<Route path="playlist/create" component={CreatePlaylist} />
|
2016-11-06 15:47:37 +13:00
|
|
|
<Route path="playlist/:uri" component={Playlist} />
|
2018-07-08 21:12:18 +12:00
|
|
|
<Route path="playlist/:uri/edit" component={EditPlaylist} />
|
2016-11-18 15:31:06 +13:00
|
|
|
<Route path="user/:uri" component={User} />
|
2017-10-09 21:08:27 +13:00
|
|
|
<Route path="track/:uri" component={Track} />
|
2016-10-03 14:44:27 +13:00
|
|
|
|
2017-06-02 09:31:05 +12:00
|
|
|
<Route path="discover/recommendations(/:seeds)" component={DiscoverRecommendations} />
|
2016-11-01 16:41:04 +13:00
|
|
|
<Route path="discover/featured" component={DiscoverFeatured} />
|
|
|
|
|
<Route path="discover/categories" component={DiscoverCategories} />
|
|
|
|
|
<Route path="discover/categories/:id" component={DiscoverCategory} />
|
|
|
|
|
<Route path="discover/new-releases" component={DiscoverNewReleases} />
|
2016-10-26 16:55:47 +13:00
|
|
|
|
2016-11-01 16:41:04 +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} />
|
2017-07-07 09:59:16 +12:00
|
|
|
<Route path="library/browse(/:uri)" component={LibraryBrowse} />
|
2016-10-03 14:44:27 +13:00
|
|
|
|
|
|
|
|
</Route>
|
|
|
|
|
</Router>
|
|
|
|
|
</Provider>,
|
|
|
|
|
document.getElementById('app')
|
|
|
|
|
);
|