2019-11-07 20:39:22 +01:00
|
|
|
// @flow
|
|
|
|
import * as PAGES from 'constants/pages';
|
2019-12-02 18:30:08 +01:00
|
|
|
import React, { useEffect } from 'react';
|
2020-02-05 15:49:03 +01:00
|
|
|
import { Route, Redirect, Switch, withRouter } from 'react-router-dom';
|
2019-11-07 20:39:22 +01:00
|
|
|
import SettingsPage from 'page/settings';
|
2020-06-19 22:18:12 +02:00
|
|
|
import SettingsNotificationsPage from 'page/settingsNotifications';
|
2020-07-27 19:43:30 +02:00
|
|
|
import SettingsAdvancedPage from 'page/settingsAdvanced';
|
2021-04-21 11:25:06 +02:00
|
|
|
import SettingsCreatorPage from 'page/settingsCreator';
|
2019-11-07 20:39:22 +01:00
|
|
|
import HelpPage from 'page/help';
|
2020-02-21 20:27:54 +01:00
|
|
|
// @if TARGET='app'
|
2020-02-21 18:23:04 +01:00
|
|
|
import BackupPage from 'page/backup';
|
2020-02-21 20:27:54 +01:00
|
|
|
// @endif
|
2020-05-23 02:18:10 +02:00
|
|
|
// @if TARGET='web'
|
2020-05-26 18:20:17 +02:00
|
|
|
import Code2257Page from 'web/page/code2257';
|
2020-05-23 02:18:10 +02:00
|
|
|
// @endif
|
2019-11-07 20:39:22 +01:00
|
|
|
import ReportPage from 'page/report';
|
2021-04-08 17:39:33 +02:00
|
|
|
import ReportContentPage from 'page/reportContent';
|
2019-11-07 20:39:22 +01:00
|
|
|
import ShowPage from 'page/show';
|
|
|
|
import PublishPage from 'page/publish';
|
|
|
|
import DiscoverPage from 'page/discover';
|
2020-01-20 17:47:03 +01:00
|
|
|
import HomePage from 'page/home';
|
2020-01-14 21:44:07 +01:00
|
|
|
import InvitedPage from 'page/invited';
|
2019-11-07 20:39:22 +01:00
|
|
|
import RewardsPage from 'page/rewards';
|
|
|
|
import FileListPublished from 'page/fileListPublished';
|
|
|
|
import InvitePage from 'page/invite';
|
|
|
|
import SearchPage from 'page/search';
|
wip
wip
wip - everything but publish, autoplay, and styling
collection publishing
add channel to collection publish
cleanup
wip
bump
clear mass add after success
move collection item management controls
redirect replace to published collection id
bump
playlist selector on create
bump
use new collection add ui element
bump
wip
gitignore
add content json
wip
bump
context add to playlist
basic collections page style pass wip
wip: edits, buttons, styles...
change fileAuthor to claimAuthor
update, pending bugfixes, delete modal progress, collection header, other bugfixes
bump
cleaning
show page bugfix
builtin collection headers
no playlists, no grid title
wip
style tweaks
use normal looking claim previews for collection tiles
add collection changes
style library previews
collection menulist for delete/view on library
delete modal works for unpublished
rearrange collection publish tabs
clean up collection publishing and items
show on odysee
begin collectoin edit header and css renaming
better thumbnails
bump
fix collection publish redirect
view collection in menu does something
copy and thumbs
list previews, pending, context menus, list page
enter to add collection, lists page empty state
playable lists only, delete feature, bump
put fileListDownloaded back
better collection titles
improve collection claim details
fix horiz more icon
fix up channel page
style, copy, bump
refactor preview overlay properties,
fix reposts showing as floppydisk
add watch later toast,
small overlay properties on wunderbar results,
fix collection actions buttons
bump
cleanup
cleaning, refactoring
bump
preview thumb styling, cleanup
support discover page lists search
sync, bump
bump, fix sync more
enforce builtin order for now
new lists page empty state
try to indicate unpublished edits in lists
bump
fix autoplay and linting
consts, fix autoplay
bugs
fixes
cleanup
fix, bump
lists experimental ui, fixes
refactor listIndex out
hack in collection fallback thumb
bump
2021-02-06 08:03:51 +01:00
|
|
|
import ListsPage from 'page/lists';
|
2019-11-07 20:39:22 +01:00
|
|
|
import LibraryPage from 'page/library';
|
|
|
|
import WalletPage from 'page/wallet';
|
2020-01-02 17:30:27 +01:00
|
|
|
import TagsFollowingPage from 'page/tagsFollowing';
|
|
|
|
import ChannelsFollowingPage from 'page/channelsFollowing';
|
2020-02-17 20:12:28 +01:00
|
|
|
import ChannelsFollowingDiscoverPage from 'page/channelsFollowingDiscover';
|
2020-01-02 23:43:09 +01:00
|
|
|
import TagsFollowingManagePage from 'page/tagsFollowingManage';
|
2019-11-07 20:39:22 +01:00
|
|
|
import ListBlockedPage from 'page/listBlocked';
|
|
|
|
import FourOhFourPage from 'page/fourOhFour';
|
|
|
|
import SignInPage from 'page/signIn';
|
2020-04-13 21:16:07 +02:00
|
|
|
import SignUpPage from 'page/signUp';
|
2020-07-07 09:52:14 +02:00
|
|
|
import PasswordResetPage from 'page/passwordReset';
|
2020-04-13 21:16:07 +02:00
|
|
|
import PasswordSetPage from 'page/passwordSet';
|
2019-11-14 01:33:36 +01:00
|
|
|
import SignInVerifyPage from 'page/signInVerify';
|
2019-11-07 20:39:22 +01:00
|
|
|
import ChannelsPage from 'page/channels';
|
2021-03-15 15:58:21 +01:00
|
|
|
import LiveStreamSetupPage from 'page/livestreamSetup';
|
2021-04-23 21:59:48 +02:00
|
|
|
import LivestreamCurrentPage from 'page/livestreamCurrent';
|
2019-12-30 20:54:53 +01:00
|
|
|
import EmbedWrapperPage from 'page/embedWrapper';
|
2020-02-11 20:04:51 +01:00
|
|
|
import TopPage from 'page/top';
|
2020-03-18 18:11:37 +01:00
|
|
|
import Welcome from 'page/welcome';
|
|
|
|
import CreatorDashboard from 'page/creatorDashboard';
|
2020-04-13 22:03:44 +02:00
|
|
|
import RewardsVerifyPage from 'page/rewardsVerify';
|
2020-05-04 18:55:10 +02:00
|
|
|
import CheckoutPage from 'page/checkoutPage';
|
2020-06-29 21:54:07 +02:00
|
|
|
import ChannelNew from 'page/channelNew';
|
2020-12-04 01:10:23 +01:00
|
|
|
import RepostNew from 'page/repost';
|
2020-06-01 19:03:19 +02:00
|
|
|
import BuyPage from 'page/buy';
|
2021-03-10 07:06:59 +01:00
|
|
|
import ReceivePage from 'page/receive';
|
2021-03-10 07:36:02 +01:00
|
|
|
import SendPage from 'page/send';
|
2021-03-10 08:13:53 +01:00
|
|
|
import SwapPage from 'page/swap';
|
2020-07-23 16:22:57 +02:00
|
|
|
import NotificationsPage from 'page/notifications';
|
2020-09-18 17:16:49 +02:00
|
|
|
import SignInWalletPasswordPage from 'page/signInWalletPassword';
|
2020-09-03 22:05:38 +02:00
|
|
|
import YoutubeSyncPage from 'page/youtubeSync';
|
wip
wip
wip - everything but publish, autoplay, and styling
collection publishing
add channel to collection publish
cleanup
wip
bump
clear mass add after success
move collection item management controls
redirect replace to published collection id
bump
playlist selector on create
bump
use new collection add ui element
bump
wip
gitignore
add content json
wip
bump
context add to playlist
basic collections page style pass wip
wip: edits, buttons, styles...
change fileAuthor to claimAuthor
update, pending bugfixes, delete modal progress, collection header, other bugfixes
bump
cleaning
show page bugfix
builtin collection headers
no playlists, no grid title
wip
style tweaks
use normal looking claim previews for collection tiles
add collection changes
style library previews
collection menulist for delete/view on library
delete modal works for unpublished
rearrange collection publish tabs
clean up collection publishing and items
show on odysee
begin collectoin edit header and css renaming
better thumbnails
bump
fix collection publish redirect
view collection in menu does something
copy and thumbs
list previews, pending, context menus, list page
enter to add collection, lists page empty state
playable lists only, delete feature, bump
put fileListDownloaded back
better collection titles
improve collection claim details
fix horiz more icon
fix up channel page
style, copy, bump
refactor preview overlay properties,
fix reposts showing as floppydisk
add watch later toast,
small overlay properties on wunderbar results,
fix collection actions buttons
bump
cleanup
cleaning, refactoring
bump
preview thumb styling, cleanup
support discover page lists search
sync, bump
bump, fix sync more
enforce builtin order for now
new lists page empty state
try to indicate unpublished edits in lists
bump
fix autoplay and linting
consts, fix autoplay
bugs
fixes
cleanup
fix, bump
lists experimental ui, fixes
refactor listIndex out
hack in collection fallback thumb
bump
2021-02-06 08:03:51 +01:00
|
|
|
import CollectionPage from 'page/collection';
|
2020-10-30 05:19:05 +01:00
|
|
|
|
2020-08-25 21:25:33 +02:00
|
|
|
import { LINKED_COMMENT_QUERY_PARAM } from 'constants/comment';
|
2020-10-07 02:59:38 +02:00
|
|
|
import { parseURI, isURIValid } from 'lbry-redux';
|
2021-03-30 01:05:18 +02:00
|
|
|
import { SITE_TITLE, WELCOME_VERSION, SIMPLE_SITE } from 'config';
|
2019-11-07 20:39:22 +01:00
|
|
|
|
|
|
|
// Tell the browser we are handling scroll restoration
|
|
|
|
if ('scrollRestoration' in history) {
|
|
|
|
history.scrollRestoration = 'manual';
|
|
|
|
}
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
currentScroll: number,
|
|
|
|
isAuthenticated: boolean,
|
2020-11-25 18:09:58 +01:00
|
|
|
location: { pathname: string, search: string, hash: string },
|
2020-01-25 21:37:02 +01:00
|
|
|
history: {
|
2020-11-25 18:09:58 +01:00
|
|
|
action: string,
|
2020-01-25 21:37:02 +01:00
|
|
|
entries: { title: string }[],
|
|
|
|
goBack: () => void,
|
|
|
|
goForward: () => void,
|
|
|
|
index: number,
|
|
|
|
length: number,
|
|
|
|
location: { pathname: string },
|
2021-02-16 22:09:20 +01:00
|
|
|
push: (string) => void,
|
2020-01-25 21:37:02 +01:00
|
|
|
state: {},
|
|
|
|
replaceState: ({}, string, string) => void,
|
2021-02-16 22:09:20 +01:00
|
|
|
listen: (any) => () => void,
|
2020-01-25 21:37:02 +01:00
|
|
|
},
|
|
|
|
uri: string,
|
|
|
|
title: string,
|
2020-02-19 07:31:40 +01:00
|
|
|
welcomeVersion: number,
|
2020-07-10 23:04:36 +02:00
|
|
|
hasNavigated: boolean,
|
|
|
|
setHasNavigated: () => void,
|
2021-02-16 22:09:20 +01:00
|
|
|
setReferrer: (string) => void,
|
2020-10-07 02:59:38 +02:00
|
|
|
hasUnclaimedRefereeReward: boolean,
|
2020-11-10 17:07:00 +01:00
|
|
|
homepageData: any,
|
2019-11-07 20:39:22 +01:00
|
|
|
};
|
|
|
|
|
2020-10-30 05:19:05 +01:00
|
|
|
type PrivateRouteProps = Props & {
|
|
|
|
component: any,
|
|
|
|
isAuthenticated: boolean,
|
|
|
|
};
|
|
|
|
|
|
|
|
function PrivateRoute(props: PrivateRouteProps) {
|
|
|
|
const { component: Component, isAuthenticated, ...rest } = props;
|
2021-04-03 06:28:54 +02:00
|
|
|
const urlSearchParams = new URLSearchParams(props.location.search);
|
|
|
|
const redirectUrl = urlSearchParams.get('redirect');
|
2020-10-30 05:19:05 +01:00
|
|
|
return (
|
|
|
|
<Route
|
|
|
|
{...rest}
|
2021-02-16 22:09:20 +01:00
|
|
|
render={(props) =>
|
2020-10-30 05:19:05 +01:00
|
|
|
isAuthenticated || !IS_WEB ? (
|
|
|
|
<Component {...props} />
|
|
|
|
) : (
|
2021-04-03 06:28:54 +02:00
|
|
|
<Redirect to={`/$/${PAGES.AUTH}?redirect=${redirectUrl || props.location.pathname}`} />
|
2020-10-30 05:19:05 +01:00
|
|
|
)
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-11-07 20:39:22 +01:00
|
|
|
function AppRouter(props: Props) {
|
2020-02-05 15:49:03 +01:00
|
|
|
const {
|
|
|
|
currentScroll,
|
2020-11-25 18:09:58 +01:00
|
|
|
location: { pathname, search, hash },
|
2020-02-05 15:49:03 +01:00
|
|
|
isAuthenticated,
|
2020-01-25 21:37:02 +01:00
|
|
|
history,
|
|
|
|
uri,
|
|
|
|
title,
|
2020-02-19 07:31:40 +01:00
|
|
|
welcomeVersion,
|
2020-07-10 23:04:36 +02:00
|
|
|
hasNavigated,
|
|
|
|
setHasNavigated,
|
2020-10-07 02:59:38 +02:00
|
|
|
hasUnclaimedRefereeReward,
|
|
|
|
setReferrer,
|
2020-11-10 17:07:00 +01:00
|
|
|
homepageData,
|
2020-02-05 15:49:03 +01:00
|
|
|
} = props;
|
2021-04-03 06:28:54 +02:00
|
|
|
const { entries, listen, action: historyAction } = history;
|
2020-01-25 21:37:02 +01:00
|
|
|
const entryIndex = history.index;
|
2020-02-27 20:00:23 +01:00
|
|
|
const urlParams = new URLSearchParams(search);
|
|
|
|
const resetScroll = urlParams.get('reset_scroll');
|
2020-08-25 21:25:33 +02:00
|
|
|
const hasLinkedCommentInUrl = urlParams.get(LINKED_COMMENT_QUERY_PARAM);
|
2020-01-25 21:37:02 +01:00
|
|
|
|
2020-11-10 17:07:00 +01:00
|
|
|
const dynamicRoutes = Object.values(homepageData).filter(
|
|
|
|
(potentialRoute: any) => potentialRoute && potentialRoute.route
|
|
|
|
);
|
|
|
|
|
2020-07-30 21:14:22 +02:00
|
|
|
// For people arriving at settings page from deeplinks, know whether they can "go back"
|
2020-07-10 23:04:36 +02:00
|
|
|
useEffect(() => {
|
2021-04-03 06:28:54 +02:00
|
|
|
const unlisten = listen((location, action) => {
|
2020-07-10 23:04:36 +02:00
|
|
|
if (action === 'PUSH') {
|
|
|
|
if (!hasNavigated && setHasNavigated) setHasNavigated();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return unlisten;
|
2021-04-03 06:28:54 +02:00
|
|
|
}, [listen, hasNavigated, setHasNavigated]);
|
2020-07-10 23:04:36 +02:00
|
|
|
|
2020-10-07 02:59:38 +02:00
|
|
|
useEffect(() => {
|
2020-10-07 19:02:09 +02:00
|
|
|
if (!hasNavigated && hasUnclaimedRefereeReward && !isAuthenticated) {
|
2020-10-07 02:59:38 +02:00
|
|
|
const valid = isURIValid(uri);
|
|
|
|
if (valid) {
|
|
|
|
const { path } = parseURI(uri);
|
2020-10-07 19:02:09 +02:00
|
|
|
if (path !== 'undefined') setReferrer(path);
|
2020-10-07 02:59:38 +02:00
|
|
|
}
|
|
|
|
}
|
2020-10-07 19:02:09 +02:00
|
|
|
}, [hasNavigated, uri, hasUnclaimedRefereeReward, setReferrer, isAuthenticated]);
|
2020-10-07 02:59:38 +02:00
|
|
|
|
2020-01-25 21:37:02 +01:00
|
|
|
useEffect(() => {
|
2020-02-13 02:48:28 +01:00
|
|
|
if (uri) {
|
|
|
|
const { channelName, streamName } = parseURI(uri);
|
|
|
|
|
2021-04-05 04:53:13 +02:00
|
|
|
if (title) {
|
2020-02-13 02:48:28 +01:00
|
|
|
document.title = title;
|
2021-04-05 04:53:13 +02:00
|
|
|
} else if (streamName) {
|
2020-02-13 02:48:28 +01:00
|
|
|
document.title = streamName;
|
2021-04-05 04:53:13 +02:00
|
|
|
} else if (channelName) {
|
2020-02-13 02:48:28 +01:00
|
|
|
document.title = channelName;
|
|
|
|
} else {
|
|
|
|
document.title = IS_WEB ? SITE_TITLE : 'LBRY';
|
|
|
|
}
|
2020-01-25 21:37:02 +01:00
|
|
|
} else {
|
|
|
|
document.title = IS_WEB ? SITE_TITLE : 'LBRY';
|
|
|
|
}
|
|
|
|
|
2020-01-26 04:40:30 +01:00
|
|
|
// @if TARGET='app'
|
2020-01-25 21:37:02 +01:00
|
|
|
entries[entryIndex].title = document.title;
|
2020-01-26 04:40:30 +01:00
|
|
|
// @endif
|
2020-01-25 21:37:02 +01:00
|
|
|
return () => {
|
|
|
|
document.title = IS_WEB ? SITE_TITLE : 'LBRY';
|
|
|
|
};
|
2020-02-13 02:48:28 +01:00
|
|
|
}, [entries, entryIndex, title, uri]);
|
2019-11-07 20:39:22 +01:00
|
|
|
|
|
|
|
useEffect(() => {
|
2020-08-25 21:25:33 +02:00
|
|
|
if (!hasLinkedCommentInUrl) {
|
2021-04-03 06:28:54 +02:00
|
|
|
if (hash && historyAction === 'PUSH') {
|
2020-11-25 18:09:58 +01:00
|
|
|
const id = hash.replace('#', '');
|
|
|
|
const element = document.getElementById(id);
|
|
|
|
if (element) {
|
|
|
|
window.scrollTo(0, element.offsetTop);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
window.scrollTo(0, currentScroll);
|
|
|
|
}
|
2020-08-25 21:25:33 +02:00
|
|
|
}
|
2021-04-03 06:28:54 +02:00
|
|
|
}, [currentScroll, pathname, search, hash, resetScroll, hasLinkedCommentInUrl, historyAction]);
|
2019-11-07 20:39:22 +01:00
|
|
|
|
2020-01-29 21:21:03 +01:00
|
|
|
// react-router doesn't decode pathanmes before doing the route matching check
|
|
|
|
// We have to redirect here because if we redirect on the server, it might get encoded again
|
|
|
|
// in the browser causing a redirect loop
|
2020-03-31 22:35:33 +02:00
|
|
|
const decodedUrl = decodeURIComponent(pathname) + search;
|
2020-03-30 22:47:07 +02:00
|
|
|
if (decodedUrl !== pathname + search) {
|
|
|
|
return <Redirect to={decodedUrl} />;
|
2020-01-29 21:21:03 +01:00
|
|
|
}
|
|
|
|
|
2019-11-07 20:39:22 +01:00
|
|
|
return (
|
2019-12-02 18:30:08 +01:00
|
|
|
<Switch>
|
2020-02-19 07:31:40 +01:00
|
|
|
{/* @if TARGET='app' */}
|
|
|
|
{welcomeVersion < WELCOME_VERSION && <Route path="/*" component={Welcome} />}
|
|
|
|
{/* @endif */}
|
2020-02-26 20:14:10 +01:00
|
|
|
<Redirect
|
|
|
|
from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING_MANAGE}`}
|
|
|
|
to={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
|
|
|
|
/>
|
|
|
|
<Redirect from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING}`} to={`/$/${PAGES.CHANNELS_FOLLOWING}`} />
|
|
|
|
<Redirect from={`/$/${PAGES.DEPRECATED__TAGS_FOLLOWING}`} to={`/$/${PAGES.TAGS_FOLLOWING}`} />
|
|
|
|
<Redirect from={`/$/${PAGES.DEPRECATED__TAGS_FOLLOWING_MANAGE}`} to={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} />
|
2020-07-23 19:02:07 +02:00
|
|
|
<Redirect from={`/$/${PAGES.DEPRECATED__PUBLISH}`} to={`/$/${PAGES.UPLOAD}`} />
|
|
|
|
<Redirect from={`/$/${PAGES.DEPRECATED__PUBLISHED}`} to={`/$/${PAGES.UPLOADS}`} />
|
2020-02-26 19:39:03 +01:00
|
|
|
|
2020-03-18 19:21:33 +01:00
|
|
|
<Route path={`/`} exact component={HomePage} />
|
2019-12-02 18:30:08 +01:00
|
|
|
<Route path={`/$/${PAGES.DISCOVER}`} exact component={DiscoverPage} />
|
2021-03-30 01:05:18 +02:00
|
|
|
{SIMPLE_SITE && <Route path={`/$/${PAGES.WILD_WEST}`} exact component={DiscoverPage} />}
|
2020-10-05 20:24:57 +02:00
|
|
|
{/* $FlowFixMe */}
|
|
|
|
{dynamicRoutes.map((dynamicRouteProps: RowDataItem) => (
|
|
|
|
<Route
|
|
|
|
key={dynamicRouteProps.route}
|
|
|
|
path={dynamicRouteProps.route}
|
2021-02-16 22:09:20 +01:00
|
|
|
component={(routerProps) => <DiscoverPage {...routerProps} dynamicRouteProps={dynamicRouteProps} />}
|
2020-10-05 20:24:57 +02:00
|
|
|
/>
|
|
|
|
))}
|
|
|
|
|
2020-04-13 21:16:07 +02:00
|
|
|
<Route path={`/$/${PAGES.AUTH_SIGNIN}`} exact component={SignInPage} />
|
2020-07-07 09:52:14 +02:00
|
|
|
<Route path={`/$/${PAGES.AUTH_PASSWORD_RESET}`} exact component={PasswordResetPage} />
|
2020-04-13 21:16:07 +02:00
|
|
|
<Route path={`/$/${PAGES.AUTH_PASSWORD_SET}`} exact component={PasswordSetPage} />
|
|
|
|
<Route path={`/$/${PAGES.AUTH}`} exact component={SignUpPage} />
|
|
|
|
<Route path={`/$/${PAGES.AUTH}/*`} exact component={SignUpPage} />
|
2020-02-19 07:31:40 +01:00
|
|
|
<Route path={`/$/${PAGES.WELCOME}`} exact component={Welcome} />
|
2020-08-10 22:47:39 +02:00
|
|
|
|
2019-12-02 18:30:08 +01:00
|
|
|
<Route path={`/$/${PAGES.HELP}`} exact component={HelpPage} />
|
2020-02-21 20:27:54 +01:00
|
|
|
{/* @if TARGET='app' */}
|
2020-02-21 18:23:04 +01:00
|
|
|
<Route path={`/$/${PAGES.BACKUP}`} exact component={BackupPage} />
|
2020-02-21 20:27:54 +01:00
|
|
|
{/* @endif */}
|
2020-05-23 02:18:10 +02:00
|
|
|
{/* @if TARGET='web' */}
|
|
|
|
<Route path={`/$/${PAGES.CODE_2257}`} exact component={Code2257Page} />
|
|
|
|
{/* @endif */}
|
2019-12-02 18:30:08 +01:00
|
|
|
<Route path={`/$/${PAGES.AUTH_VERIFY}`} exact component={SignInVerifyPage} />
|
|
|
|
<Route path={`/$/${PAGES.SEARCH}`} exact component={SearchPage} />
|
2020-02-11 20:04:51 +01:00
|
|
|
<Route path={`/$/${PAGES.TOP}`} exact component={TopPage} />
|
2019-12-02 18:30:08 +01:00
|
|
|
<Route path={`/$/${PAGES.SETTINGS}`} exact component={SettingsPage} />
|
2020-07-27 19:43:30 +02:00
|
|
|
<Route path={`/$/${PAGES.SETTINGS_ADVANCED}`} exact component={SettingsAdvancedPage} />
|
2020-01-14 21:44:07 +01:00
|
|
|
<Route path={`/$/${PAGES.INVITE}/:referrer`} exact component={InvitedPage} />
|
2020-05-04 18:55:10 +02:00
|
|
|
<Route path={`/$/${PAGES.CHECKOUT}`} exact component={CheckoutPage} />
|
2021-04-08 17:39:33 +02:00
|
|
|
<Route path={`/$/${PAGES.REPORT_CONTENT}`} exact component={ReportContentPage} />
|
wip
wip
wip - everything but publish, autoplay, and styling
collection publishing
add channel to collection publish
cleanup
wip
bump
clear mass add after success
move collection item management controls
redirect replace to published collection id
bump
playlist selector on create
bump
use new collection add ui element
bump
wip
gitignore
add content json
wip
bump
context add to playlist
basic collections page style pass wip
wip: edits, buttons, styles...
change fileAuthor to claimAuthor
update, pending bugfixes, delete modal progress, collection header, other bugfixes
bump
cleaning
show page bugfix
builtin collection headers
no playlists, no grid title
wip
style tweaks
use normal looking claim previews for collection tiles
add collection changes
style library previews
collection menulist for delete/view on library
delete modal works for unpublished
rearrange collection publish tabs
clean up collection publishing and items
show on odysee
begin collectoin edit header and css renaming
better thumbnails
bump
fix collection publish redirect
view collection in menu does something
copy and thumbs
list previews, pending, context menus, list page
enter to add collection, lists page empty state
playable lists only, delete feature, bump
put fileListDownloaded back
better collection titles
improve collection claim details
fix horiz more icon
fix up channel page
style, copy, bump
refactor preview overlay properties,
fix reposts showing as floppydisk
add watch later toast,
small overlay properties on wunderbar results,
fix collection actions buttons
bump
cleanup
cleaning, refactoring
bump
preview thumb styling, cleanup
support discover page lists search
sync, bump
bump, fix sync more
enforce builtin order for now
new lists page empty state
try to indicate unpublished edits in lists
bump
fix autoplay and linting
consts, fix autoplay
bugs
fixes
cleanup
fix, bump
lists experimental ui, fixes
refactor listIndex out
hack in collection fallback thumb
bump
2021-02-06 08:03:51 +01:00
|
|
|
<Route {...props} path={`/$/${PAGES.LIST}/:collectionId`} component={CollectionPage} />
|
2019-11-07 20:39:22 +01:00
|
|
|
|
2020-10-05 20:24:57 +02:00
|
|
|
<PrivateRoute {...props} exact path={`/$/${PAGES.YOUTUBE_SYNC}`} component={YoutubeSyncPage} />
|
2020-08-11 22:32:03 +02:00
|
|
|
<PrivateRoute {...props} exact path={`/$/${PAGES.TAGS_FOLLOWING}`} component={TagsFollowingPage} />
|
2020-08-10 22:47:39 +02:00
|
|
|
<PrivateRoute
|
|
|
|
{...props}
|
2020-08-11 22:32:03 +02:00
|
|
|
exact
|
2020-08-10 22:47:39 +02:00
|
|
|
path={`/$/${PAGES.CHANNELS_FOLLOWING}`}
|
|
|
|
component={isAuthenticated || !IS_WEB ? ChannelsFollowingPage : DiscoverPage}
|
|
|
|
/>
|
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_NOTIFICATIONS}`} component={SettingsNotificationsPage} />
|
2020-07-23 16:22:57 +02:00
|
|
|
<PrivateRoute
|
|
|
|
{...props}
|
2020-08-11 22:32:03 +02:00
|
|
|
exact
|
2020-08-10 22:47:39 +02:00
|
|
|
path={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
|
|
|
|
component={ChannelsFollowingDiscoverPage}
|
2020-07-23 16:22:57 +02:00
|
|
|
/>
|
2019-12-02 18:30:08 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.INVITE}`} component={InvitePage} />
|
2020-06-29 21:54:07 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.CHANNEL_NEW}`} component={ChannelNew} />
|
2020-12-04 01:10:23 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.REPOST_NEW}`} component={RepostNew} />
|
2020-07-23 19:02:07 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.UPLOADS}`} component={FileListPublished} />
|
2020-03-18 18:11:37 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.CREATOR_DASHBOARD}`} component={CreatorDashboard} />
|
2020-07-23 19:02:07 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.UPLOAD}`} component={PublishPage} />
|
2019-12-02 18:30:08 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.REPORT}`} component={ReportPage} />
|
2020-04-13 22:03:44 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS}`} exact component={RewardsPage} />
|
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS_VERIFY}`} component={RewardsVerifyPage} />
|
2019-12-02 18:30:08 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.LIBRARY}`} component={LibraryPage} />
|
wip
wip
wip - everything but publish, autoplay, and styling
collection publishing
add channel to collection publish
cleanup
wip
bump
clear mass add after success
move collection item management controls
redirect replace to published collection id
bump
playlist selector on create
bump
use new collection add ui element
bump
wip
gitignore
add content json
wip
bump
context add to playlist
basic collections page style pass wip
wip: edits, buttons, styles...
change fileAuthor to claimAuthor
update, pending bugfixes, delete modal progress, collection header, other bugfixes
bump
cleaning
show page bugfix
builtin collection headers
no playlists, no grid title
wip
style tweaks
use normal looking claim previews for collection tiles
add collection changes
style library previews
collection menulist for delete/view on library
delete modal works for unpublished
rearrange collection publish tabs
clean up collection publishing and items
show on odysee
begin collectoin edit header and css renaming
better thumbnails
bump
fix collection publish redirect
view collection in menu does something
copy and thumbs
list previews, pending, context menus, list page
enter to add collection, lists page empty state
playable lists only, delete feature, bump
put fileListDownloaded back
better collection titles
improve collection claim details
fix horiz more icon
fix up channel page
style, copy, bump
refactor preview overlay properties,
fix reposts showing as floppydisk
add watch later toast,
small overlay properties on wunderbar results,
fix collection actions buttons
bump
cleanup
cleaning, refactoring
bump
preview thumb styling, cleanup
support discover page lists search
sync, bump
bump, fix sync more
enforce builtin order for now
new lists page empty state
try to indicate unpublished edits in lists
bump
fix autoplay and linting
consts, fix autoplay
bugs
fixes
cleanup
fix, bump
lists experimental ui, fixes
refactor listIndex out
hack in collection fallback thumb
bump
2021-02-06 08:03:51 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.LISTS}`} component={ListsPage} />
|
2020-01-02 23:43:09 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} component={TagsFollowingManagePage} />
|
2021-03-03 19:50:16 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_BLOCKED_MUTED}`} component={ListBlockedPage} />
|
2021-04-21 11:25:06 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_CREATOR}`} component={SettingsCreatorPage} />
|
2019-12-02 18:30:08 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.WALLET}`} exact component={WalletPage} />
|
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.CHANNELS}`} component={ChannelsPage} />
|
2021-03-15 15:58:21 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.LIVESTREAM}`} component={LiveStreamSetupPage} />
|
2021-04-23 21:59:48 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.LIVESTREAM_CURRENT}`} component={LivestreamCurrentPage} />
|
2020-06-01 19:03:19 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.BUY}`} component={BuyPage} />
|
2021-03-10 07:06:59 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.RECEIVE}`} component={ReceivePage} />
|
2021-03-10 07:36:02 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.SEND}`} component={SendPage} />
|
2021-03-10 08:13:53 +01:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.SWAP}`} component={SwapPage} />
|
2020-07-23 16:22:57 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.NOTIFICATIONS}`} component={NotificationsPage} />
|
2020-09-18 17:16:49 +02:00
|
|
|
<PrivateRoute {...props} path={`/$/${PAGES.AUTH_WALLET_PASSWORD}`} component={SignInWalletPasswordPage} />
|
2019-11-07 20:39:22 +01:00
|
|
|
|
2019-12-30 20:54:53 +01:00
|
|
|
<Route path={`/$/${PAGES.EMBED}/:claimName`} exact component={EmbedWrapperPage} />
|
|
|
|
<Route path={`/$/${PAGES.EMBED}/:claimName/:claimId`} exact component={EmbedWrapperPage} />
|
2021-04-28 03:16:28 +02:00
|
|
|
|
2019-12-02 18:30:08 +01:00
|
|
|
{/* Below need to go at the end to make sure we don't match any of our pages first */}
|
|
|
|
<Route path="/:claimName" exact component={ShowPage} />
|
|
|
|
<Route path="/:claimName/:streamName" exact component={ShowPage} />
|
|
|
|
<Route path="/*" component={FourOhFourPage} />
|
|
|
|
</Switch>
|
2019-11-07 20:39:22 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2020-02-05 15:49:03 +01:00
|
|
|
export default withRouter(AppRouter);
|