|
|
@ -67,8 +67,8 @@ import {
|
|
|
|
About,
|
|
|
|
About,
|
|
|
|
PrivacyPolicy,
|
|
|
|
PrivacyPolicy,
|
|
|
|
} from './util/async-components';
|
|
|
|
} from './util/async-components';
|
|
|
|
|
|
|
|
import { ColumnsContextProvider } from './util/columns_context';
|
|
|
|
import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
|
|
|
|
import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
|
|
|
|
|
|
|
|
|
|
|
|
// Dummy import, to make sure that <Status /> ends up in the application bundle.
|
|
|
|
// Dummy import, to make sure that <Status /> ends up in the application bundle.
|
|
|
|
// Without this it ends up in ~8 very commonly used bundles.
|
|
|
|
// Without this it ends up in ~8 very commonly used bundles.
|
|
|
|
import '../../components/status';
|
|
|
|
import '../../components/status';
|
|
|
@ -188,69 +188,71 @@ class SwitchingColumnsArea extends PureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<ColumnsAreaContainer ref={this.setRef} singleColumn={singleColumn}>
|
|
|
|
<ColumnsContextProvider multiColumn={!singleColumn}>
|
|
|
|
<WrappedSwitch>
|
|
|
|
<ColumnsAreaContainer ref={this.setRef} singleColumn={singleColumn}>
|
|
|
|
{redirect}
|
|
|
|
<WrappedSwitch>
|
|
|
|
|
|
|
|
{redirect}
|
|
|
|
{singleColumn ? <Redirect from='/deck' to='/home' exact /> : null}
|
|
|
|
|
|
|
|
{singleColumn && pathName.startsWith('/deck/') ? <Redirect from={pathName} to={pathName.slice(5)} /> : null}
|
|
|
|
{singleColumn ? <Redirect from='/deck' to='/home' exact /> : null}
|
|
|
|
{/* Redirect old bookmarks (without /deck) with home-like routes to the advanced interface */}
|
|
|
|
{singleColumn && pathName.startsWith('/deck/') ? <Redirect from={pathName} to={pathName.slice(5)} /> : null}
|
|
|
|
{!singleColumn && pathName === '/getting-started' ? <Redirect from='/getting-started' to='/deck/getting-started' exact /> : null}
|
|
|
|
{/* Redirect old bookmarks (without /deck) with home-like routes to the advanced interface */}
|
|
|
|
{!singleColumn && pathName === '/home' ? <Redirect from='/home' to='/deck/getting-started' exact /> : null}
|
|
|
|
{!singleColumn && pathName === '/getting-started' ? <Redirect from='/getting-started' to='/deck/getting-started' exact /> : null}
|
|
|
|
|
|
|
|
{!singleColumn && pathName === '/home' ? <Redirect from='/home' to='/deck/getting-started' exact /> : null}
|
|
|
|
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/keyboard-shortcuts' component={KeyboardShortcuts} content={children} />
|
|
|
|
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
|
|
|
|
<WrappedRoute path='/about' component={About} content={children} />
|
|
|
|
<WrappedRoute path='/keyboard-shortcuts' component={KeyboardShortcuts} content={children} />
|
|
|
|
<WrappedRoute path='/privacy-policy' component={PrivacyPolicy} content={children} />
|
|
|
|
<WrappedRoute path='/about' component={About} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/privacy-policy' component={PrivacyPolicy} content={children} />
|
|
|
|
<WrappedRoute path={['/home', '/timelines/home']} component={HomeTimeline} content={children} />
|
|
|
|
|
|
|
|
<Redirect from='/timelines/public' to='/public' exact />
|
|
|
|
<WrappedRoute path={['/home', '/timelines/home']} component={HomeTimeline} content={children} />
|
|
|
|
<Redirect from='/timelines/public/local' to='/public/local' exact />
|
|
|
|
<Redirect from='/timelines/public' to='/public' exact />
|
|
|
|
<WrappedRoute path='/public' exact component={Firehose} componentParams={{ feedType: 'public' }} content={children} />
|
|
|
|
<Redirect from='/timelines/public/local' to='/public/local' exact />
|
|
|
|
<WrappedRoute path='/public/local' exact component={Firehose} componentParams={{ feedType: 'community' }} content={children} />
|
|
|
|
<WrappedRoute path='/public' exact component={Firehose} componentParams={{ feedType: 'public' }} content={children} />
|
|
|
|
<WrappedRoute path='/public/remote' exact component={Firehose} componentParams={{ feedType: 'public:remote' }} content={children} />
|
|
|
|
<WrappedRoute path='/public/local' exact component={Firehose} componentParams={{ feedType: 'community' }} content={children} />
|
|
|
|
<WrappedRoute path={['/conversations', '/timelines/direct']} component={DirectTimeline} content={children} />
|
|
|
|
<WrappedRoute path='/public/remote' exact component={Firehose} componentParams={{ feedType: 'public:remote' }} content={children} />
|
|
|
|
<WrappedRoute path='/tags/:id' component={HashtagTimeline} content={children} />
|
|
|
|
<WrappedRoute path={['/conversations', '/timelines/direct']} component={DirectTimeline} content={children} />
|
|
|
|
<WrappedRoute path='/lists/:id' component={ListTimeline} content={children} />
|
|
|
|
<WrappedRoute path='/tags/:id' component={HashtagTimeline} content={children} />
|
|
|
|
<WrappedRoute path='/notifications' component={Notifications} content={children} />
|
|
|
|
<WrappedRoute path='/lists/:id' component={ListTimeline} content={children} />
|
|
|
|
<WrappedRoute path='/favourites' component={FavouritedStatuses} content={children} />
|
|
|
|
<WrappedRoute path='/notifications' component={Notifications} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/favourites' component={FavouritedStatuses} content={children} />
|
|
|
|
<WrappedRoute path='/bookmarks' component={BookmarkedStatuses} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/pinned' component={PinnedStatuses} content={children} />
|
|
|
|
<WrappedRoute path='/bookmarks' component={BookmarkedStatuses} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/pinned' component={PinnedStatuses} content={children} />
|
|
|
|
<WrappedRoute path='/start' exact component={Onboarding} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/directory' component={Directory} content={children} />
|
|
|
|
<WrappedRoute path='/start' exact component={Onboarding} content={children} />
|
|
|
|
<WrappedRoute path={['/explore', '/search']} component={Explore} content={children} />
|
|
|
|
<WrappedRoute path='/directory' component={Directory} content={children} />
|
|
|
|
<WrappedRoute path={['/publish', '/statuses/new']} component={Compose} content={children} />
|
|
|
|
<WrappedRoute path={['/explore', '/search']} component={Explore} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path={['/publish', '/statuses/new']} component={Compose} content={children} />
|
|
|
|
<WrappedRoute path={['/@:acct', '/accounts/:id']} exact component={AccountTimeline} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/@:acct/tagged/:tagged?' exact component={AccountTimeline} content={children} />
|
|
|
|
<WrappedRoute path={['/@:acct', '/accounts/:id']} exact component={AccountTimeline} content={children} />
|
|
|
|
<WrappedRoute path={['/@:acct/with_replies', '/accounts/:id/with_replies']} component={AccountTimeline} content={children} componentParams={{ withReplies: true }} />
|
|
|
|
<WrappedRoute path='/@:acct/tagged/:tagged?' exact component={AccountTimeline} content={children} />
|
|
|
|
<WrappedRoute path={['/accounts/:id/followers', '/users/:acct/followers', '/@:acct/followers']} component={Followers} content={children} />
|
|
|
|
<WrappedRoute path={['/@:acct/with_replies', '/accounts/:id/with_replies']} component={AccountTimeline} content={children} componentParams={{ withReplies: true }} />
|
|
|
|
<WrappedRoute path={['/accounts/:id/following', '/users/:acct/following', '/@:acct/following']} component={Following} content={children} />
|
|
|
|
<WrappedRoute path={['/accounts/:id/followers', '/users/:acct/followers', '/@:acct/followers']} component={Followers} content={children} />
|
|
|
|
<WrappedRoute path={['/@:acct/media', '/accounts/:id/media']} component={AccountGallery} content={children} />
|
|
|
|
<WrappedRoute path={['/accounts/:id/following', '/users/:acct/following', '/@:acct/following']} component={Following} content={children} />
|
|
|
|
<WrappedRoute path='/@:acct/:statusId' exact component={Status} content={children} />
|
|
|
|
<WrappedRoute path={['/@:acct/media', '/accounts/:id/media']} component={AccountGallery} content={children} />
|
|
|
|
<WrappedRoute path='/@:acct/:statusId/reblogs' component={Reblogs} content={children} />
|
|
|
|
<WrappedRoute path='/@:acct/:statusId' exact component={Status} content={children} />
|
|
|
|
<WrappedRoute path='/@:acct/:statusId/favourites' component={Favourites} content={children} />
|
|
|
|
<WrappedRoute path='/@:acct/:statusId/reblogs' component={Reblogs} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/@:acct/:statusId/favourites' component={Favourites} content={children} />
|
|
|
|
{/* Legacy routes, cannot be easily factored with other routes because they share a param name */}
|
|
|
|
|
|
|
|
<WrappedRoute path='/timelines/tag/:id' component={HashtagTimeline} content={children} />
|
|
|
|
{/* Legacy routes, cannot be easily factored with other routes because they share a param name */}
|
|
|
|
<WrappedRoute path='/timelines/list/:id' component={ListTimeline} content={children} />
|
|
|
|
<WrappedRoute path='/timelines/tag/:id' component={HashtagTimeline} content={children} />
|
|
|
|
<WrappedRoute path='/statuses/:statusId' exact component={Status} content={children} />
|
|
|
|
<WrappedRoute path='/timelines/list/:id' component={ListTimeline} content={children} />
|
|
|
|
<WrappedRoute path='/statuses/:statusId/reblogs' component={Reblogs} content={children} />
|
|
|
|
<WrappedRoute path='/statuses/:statusId' exact component={Status} content={children} />
|
|
|
|
<WrappedRoute path='/statuses/:statusId/favourites' component={Favourites} content={children} />
|
|
|
|
<WrappedRoute path='/statuses/:statusId/reblogs' component={Reblogs} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/statuses/:statusId/favourites' component={Favourites} content={children} />
|
|
|
|
<WrappedRoute path='/follow_requests' component={FollowRequests} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/blocks' component={Blocks} content={children} />
|
|
|
|
<WrappedRoute path='/follow_requests' component={FollowRequests} content={children} />
|
|
|
|
<WrappedRoute path='/domain_blocks' component={DomainBlocks} content={children} />
|
|
|
|
<WrappedRoute path='/blocks' component={Blocks} content={children} />
|
|
|
|
<WrappedRoute path='/followed_tags' component={FollowedTags} content={children} />
|
|
|
|
<WrappedRoute path='/domain_blocks' component={DomainBlocks} content={children} />
|
|
|
|
<WrappedRoute path='/mutes' component={Mutes} content={children} />
|
|
|
|
<WrappedRoute path='/followed_tags' component={FollowedTags} content={children} />
|
|
|
|
<WrappedRoute path='/lists' component={Lists} content={children} />
|
|
|
|
<WrappedRoute path='/mutes' component={Mutes} content={children} />
|
|
|
|
<WrappedRoute path='/getting-started-misc' component={GettingStartedMisc} content={children} />
|
|
|
|
<WrappedRoute path='/lists' component={Lists} content={children} />
|
|
|
|
|
|
|
|
<WrappedRoute path='/getting-started-misc' component={GettingStartedMisc} content={children} />
|
|
|
|
<Route component={BundleColumnError} />
|
|
|
|
|
|
|
|
</WrappedSwitch>
|
|
|
|
<Route component={BundleColumnError} />
|
|
|
|
</ColumnsAreaContainer>
|
|
|
|
</WrappedSwitch>
|
|
|
|
|
|
|
|
</ColumnsAreaContainer>
|
|
|
|
|
|
|
|
</ColumnsContextProvider>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|