|
|
|
@ -9,11 +9,12 @@ import {
|
|
|
|
|
import { setAccessToken } from '../actions/meta';
|
|
|
|
|
import { setAccountSelf } from '../actions/accounts';
|
|
|
|
|
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
|
|
|
|
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
|
|
|
|
import {
|
|
|
|
|
applyRouterMiddleware,
|
|
|
|
|
useRouterHistory,
|
|
|
|
|
Router,
|
|
|
|
|
Route,
|
|
|
|
|
hashHistory,
|
|
|
|
|
IndexRoute
|
|
|
|
|
} from 'react-router';
|
|
|
|
|
import { useScroll } from 'react-router-scroll';
|
|
|
|
@ -34,6 +35,10 @@ import HashtagTimeline from '../features/hashtag_timeline';
|
|
|
|
|
|
|
|
|
|
const store = configureStore();
|
|
|
|
|
|
|
|
|
|
const browserHistory = useRouterHistory(createBrowserHistory)({
|
|
|
|
|
basename: '/web'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const Mastodon = React.createClass({
|
|
|
|
|
|
|
|
|
|
propTypes: {
|
|
|
|
@ -78,24 +83,24 @@ const Mastodon = React.createClass({
|
|
|
|
|
render () {
|
|
|
|
|
return (
|
|
|
|
|
<Provider store={store}>
|
|
|
|
|
<Router history={hashHistory} render={applyRouterMiddleware(useScroll())}>
|
|
|
|
|
<Router history={browserHistory} render={applyRouterMiddleware(useScroll())}>
|
|
|
|
|
<Route path='/' component={UI}>
|
|
|
|
|
<IndexRoute component={GettingStarted} />
|
|
|
|
|
<Route path='/statuses/new' component={Compose} />
|
|
|
|
|
|
|
|
|
|
<Route path='/statuses/home' component={HomeTimeline} />
|
|
|
|
|
<Route path='/statuses/mentions' component={MentionsTimeline} />
|
|
|
|
|
<Route path='/statuses/all' component={PublicTimeline} />
|
|
|
|
|
<Route path='/statuses/tag/:id' component={HashtagTimeline} />
|
|
|
|
|
<Route path='timelines/home' component={HomeTimeline} />
|
|
|
|
|
<Route path='timelines/mentions' component={MentionsTimeline} />
|
|
|
|
|
<Route path='timelines/public' component={PublicTimeline} />
|
|
|
|
|
<Route path='timelines/tag/:id' component={HashtagTimeline} />
|
|
|
|
|
|
|
|
|
|
<Route path='/statuses/:statusId' component={Status} />
|
|
|
|
|
<Route path='/statuses/:statusId/reblogs' component={Reblogs} />
|
|
|
|
|
<Route path='/statuses/:statusId/favourites' component={Favourites} />
|
|
|
|
|
<Route path='statuses/new' component={Compose} />
|
|
|
|
|
<Route path='statuses/:statusId' component={Status} />
|
|
|
|
|
<Route path='statuses/:statusId/reblogs' component={Reblogs} />
|
|
|
|
|
<Route path='statuses/:statusId/favourites' component={Favourites} />
|
|
|
|
|
|
|
|
|
|
<Route path='/accounts/:accountId' component={Account}>
|
|
|
|
|
<Route path='accounts/:accountId' component={Account}>
|
|
|
|
|
<IndexRoute component={AccountTimeline} />
|
|
|
|
|
<Route path='/accounts/:accountId/followers' component={Followers} />
|
|
|
|
|
<Route path='/accounts/:accountId/following' component={Following} />
|
|
|
|
|
<Route path='followers' component={Followers} />
|
|
|
|
|
<Route path='following' component={Following} />
|
|
|
|
|
</Route>
|
|
|
|
|
</Route>
|
|
|
|
|
</Router>
|
|
|
|
|