2018-11-23 07:04:42 +00:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import React from 'react';
|
2020-07-28 18:47:25 +00:00
|
|
|
import { Redirect, Route } from 'react-router-dom';
|
2021-08-19 19:13:14 +00:00
|
|
|
import BlocklistConnector from 'Activity/Blocklist/BlocklistConnector';
|
2020-07-28 18:47:25 +00:00
|
|
|
import HistoryConnector from 'Activity/History/HistoryConnector';
|
|
|
|
import QueueConnector from 'Activity/Queue/QueueConnector';
|
|
|
|
import AddNewMovieConnector from 'AddMovie/AddNewMovie/AddNewMovieConnector';
|
|
|
|
import ImportMovies from 'AddMovie/ImportMovie/ImportMovies';
|
|
|
|
import CalendarPageConnector from 'Calendar/CalendarPageConnector';
|
2022-03-08 02:03:00 +00:00
|
|
|
import CollectionConnector from 'Collection/CollectionConnector';
|
2018-11-23 07:04:42 +00:00
|
|
|
import NotFound from 'Components/NotFound';
|
|
|
|
import Switch from 'Components/Router/Switch';
|
2020-06-09 05:51:23 +00:00
|
|
|
import DiscoverMovieConnector from 'DiscoverMovie/DiscoverMovieConnector';
|
2018-11-23 07:04:42 +00:00
|
|
|
import MovieDetailsPageConnector from 'Movie/Details/MovieDetailsPageConnector';
|
2023-03-12 19:03:34 +00:00
|
|
|
import MovieIndex from 'Movie/Index/MovieIndex';
|
2019-06-11 02:59:39 +00:00
|
|
|
import CustomFormatSettingsConnector from 'Settings/CustomFormats/CustomFormatSettingsConnector';
|
2018-11-23 07:04:42 +00:00
|
|
|
import DownloadClientSettingsConnector from 'Settings/DownloadClients/DownloadClientSettingsConnector';
|
2020-07-28 18:47:25 +00:00
|
|
|
import GeneralSettingsConnector from 'Settings/General/GeneralSettingsConnector';
|
2020-09-04 02:50:56 +00:00
|
|
|
import ImportListSettingsConnector from 'Settings/ImportLists/ImportListSettingsConnector';
|
2020-07-28 18:47:25 +00:00
|
|
|
import IndexerSettingsConnector from 'Settings/Indexers/IndexerSettingsConnector';
|
|
|
|
import MediaManagementConnector from 'Settings/MediaManagement/MediaManagementConnector';
|
|
|
|
import MetadataSettings from 'Settings/Metadata/MetadataSettings';
|
2018-11-23 07:04:42 +00:00
|
|
|
import NotificationSettings from 'Settings/Notifications/NotificationSettings';
|
2020-07-28 18:47:25 +00:00
|
|
|
import Profiles from 'Settings/Profiles/Profiles';
|
2022-06-06 03:50:46 +00:00
|
|
|
import QualityConnector from 'Settings/Quality/QualityConnector';
|
2020-07-28 18:47:25 +00:00
|
|
|
import Settings from 'Settings/Settings';
|
2018-11-23 07:04:42 +00:00
|
|
|
import TagSettings from 'Settings/Tags/TagSettings';
|
|
|
|
import UISettingsConnector from 'Settings/UI/UISettingsConnector';
|
|
|
|
import BackupsConnector from 'System/Backup/BackupsConnector';
|
|
|
|
import LogsTableConnector from 'System/Events/LogsTableConnector';
|
|
|
|
import Logs from 'System/Logs/Logs';
|
2020-07-28 18:47:25 +00:00
|
|
|
import Status from 'System/Status/Status';
|
|
|
|
import Tasks from 'System/Tasks/Tasks';
|
|
|
|
import UpdatesConnector from 'System/Updates/UpdatesConnector';
|
|
|
|
import getPathWithUrlBase from 'Utilities/getPathWithUrlBase';
|
2018-11-23 07:04:42 +00:00
|
|
|
|
|
|
|
function AppRoutes(props) {
|
|
|
|
const {
|
|
|
|
app
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Switch>
|
|
|
|
{/*
|
|
|
|
Movies
|
|
|
|
*/}
|
|
|
|
|
|
|
|
<Route
|
|
|
|
exact={true}
|
|
|
|
path="/"
|
2023-03-12 19:03:34 +00:00
|
|
|
component={MovieIndex}
|
2018-11-23 07:04:42 +00:00
|
|
|
/>
|
|
|
|
|
|
|
|
{
|
|
|
|
window.Radarr.urlBase &&
|
2019-12-07 02:38:58 +00:00
|
|
|
<Route
|
|
|
|
exact={true}
|
|
|
|
path="/"
|
|
|
|
addUrlBase={false}
|
|
|
|
render={() => {
|
|
|
|
return (
|
|
|
|
<Redirect
|
|
|
|
to={getPathWithUrlBase('/')}
|
|
|
|
component={app}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}}
|
|
|
|
/>
|
2018-11-23 07:04:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/add/new"
|
|
|
|
component={AddNewMovieConnector}
|
|
|
|
/>
|
|
|
|
|
2022-03-08 02:03:00 +00:00
|
|
|
<Route
|
|
|
|
path="/collections"
|
|
|
|
component={CollectionConnector}
|
|
|
|
/>
|
|
|
|
|
2018-11-23 07:04:42 +00:00
|
|
|
<Route
|
|
|
|
path="/add/import"
|
|
|
|
component={ImportMovies}
|
|
|
|
/>
|
|
|
|
|
2019-10-06 03:21:55 +00:00
|
|
|
<Route
|
|
|
|
path="/add/discover"
|
2020-06-09 05:51:23 +00:00
|
|
|
component={DiscoverMovieConnector}
|
2019-10-06 03:21:55 +00:00
|
|
|
/>
|
|
|
|
|
2018-11-23 07:04:42 +00:00
|
|
|
<Route
|
|
|
|
path="/movie/:titleSlug"
|
|
|
|
component={MovieDetailsPageConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{/*
|
|
|
|
Calendar
|
|
|
|
*/}
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/calendar"
|
|
|
|
component={CalendarPageConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{/*
|
|
|
|
Activity
|
|
|
|
*/}
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/activity/history"
|
|
|
|
component={HistoryConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/activity/queue"
|
|
|
|
component={QueueConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
2021-08-19 19:13:14 +00:00
|
|
|
path="/activity/blocklist"
|
|
|
|
component={BlocklistConnector}
|
2018-11-23 07:04:42 +00:00
|
|
|
/>
|
|
|
|
|
|
|
|
{/*
|
|
|
|
Settings
|
|
|
|
*/}
|
|
|
|
|
|
|
|
<Route
|
|
|
|
exact={true}
|
|
|
|
path="/settings"
|
|
|
|
component={Settings}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/mediamanagement"
|
|
|
|
component={MediaManagementConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/profiles"
|
|
|
|
component={Profiles}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/quality"
|
2022-06-06 03:50:46 +00:00
|
|
|
component={QualityConnector}
|
2018-11-23 07:04:42 +00:00
|
|
|
/>
|
|
|
|
|
2019-04-13 03:25:58 +00:00
|
|
|
<Route
|
|
|
|
path="/settings/customformats"
|
2019-06-11 02:59:39 +00:00
|
|
|
component={CustomFormatSettingsConnector}
|
2019-04-13 03:25:58 +00:00
|
|
|
/>
|
|
|
|
|
2018-11-23 07:04:42 +00:00
|
|
|
<Route
|
|
|
|
path="/settings/indexers"
|
|
|
|
component={IndexerSettingsConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/downloadclients"
|
|
|
|
component={DownloadClientSettingsConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
2020-09-04 02:50:56 +00:00
|
|
|
path="/settings/importlists"
|
|
|
|
component={ImportListSettingsConnector}
|
2018-11-23 07:04:42 +00:00
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/connect"
|
|
|
|
component={NotificationSettings}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/metadata"
|
|
|
|
component={MetadataSettings}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/tags"
|
|
|
|
component={TagSettings}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/general"
|
|
|
|
component={GeneralSettingsConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/settings/ui"
|
|
|
|
component={UISettingsConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{/*
|
|
|
|
System
|
|
|
|
*/}
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/system/status"
|
|
|
|
component={Status}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/system/tasks"
|
|
|
|
component={Tasks}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/system/backup"
|
|
|
|
component={BackupsConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/system/updates"
|
|
|
|
component={UpdatesConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/system/events"
|
|
|
|
component={LogsTableConnector}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="/system/logs/files"
|
|
|
|
component={Logs}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{/*
|
|
|
|
Not Found
|
|
|
|
*/}
|
|
|
|
|
|
|
|
<Route
|
|
|
|
path="*"
|
|
|
|
component={NotFound}
|
|
|
|
/>
|
|
|
|
</Switch>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
AppRoutes.propTypes = {
|
|
|
|
app: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
|
|
|
|
export default AppRoutes;
|