mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add basic 404 page and *.html redirect
This commit is contained in:
parent
ed899a77cf
commit
6f670d5c3e
4 changed files with 75 additions and 2 deletions
|
@ -5,6 +5,7 @@ import ConnectionRequired from 'components/ConnectionRequired';
|
|||
import { toAsyncPageRoute } from 'components/router/AsyncRoute';
|
||||
import { toViewManagerPageRoute } from 'components/router/LegacyRoute';
|
||||
import ErrorBoundary from 'components/router/ErrorBoundary';
|
||||
import FallbackRoute from 'components/router/FallbackRoute';
|
||||
|
||||
import { ASYNC_USER_ROUTES } from './asyncRoutes';
|
||||
import { LEGACY_PUBLIC_ROUTES, LEGACY_USER_ROUTES } from './legacyRoutes';
|
||||
|
@ -33,7 +34,13 @@ export const EXPERIMENTAL_APP_ROUTES: RouteObject[] = [
|
|||
|
||||
/* Public routes */
|
||||
{ index: true, element: <Navigate replace to='/home.html' /> },
|
||||
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute)
|
||||
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute),
|
||||
|
||||
/* Fallback route for invalid paths */
|
||||
{
|
||||
path: '*',
|
||||
Component: FallbackRoute
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
|
@ -5,6 +5,7 @@ import ConnectionRequired from 'components/ConnectionRequired';
|
|||
import { toAsyncPageRoute } from 'components/router/AsyncRoute';
|
||||
import { toViewManagerPageRoute } from 'components/router/LegacyRoute';
|
||||
import ErrorBoundary from 'components/router/ErrorBoundary';
|
||||
import FallbackRoute from 'components/router/FallbackRoute';
|
||||
|
||||
import AppLayout from '../AppLayout';
|
||||
|
||||
|
@ -28,7 +29,13 @@ export const STABLE_APP_ROUTES: RouteObject[] = [
|
|||
|
||||
/* Public routes */
|
||||
{ index: true, element: <Navigate replace to='/home.html' /> },
|
||||
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute)
|
||||
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute),
|
||||
|
||||
/* Fallback route for invalid paths */
|
||||
{
|
||||
path: '*',
|
||||
Component: FallbackRoute
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue