diff --git a/src/apps/dashboard/components/drawer/sections/DevicesDrawerSection.tsx b/src/apps/dashboard/components/drawer/sections/DevicesDrawerSection.tsx index 6cc7ab79fc..6d788f6b40 100644 --- a/src/apps/dashboard/components/drawer/sections/DevicesDrawerSection.tsx +++ b/src/apps/dashboard/components/drawer/sections/DevicesDrawerSection.tsx @@ -1,26 +1,15 @@ -import { Devices, Analytics, Input, ExpandLess, ExpandMore } from '@mui/icons-material'; -import Collapse from '@mui/material/Collapse'; +import { Devices, Analytics, Input } from '@mui/icons-material'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemIcon from '@mui/material/ListItemIcon'; import ListItemText from '@mui/material/ListItemText'; import ListSubheader from '@mui/material/ListSubheader'; import React from 'react'; -import { useLocation } from 'react-router-dom'; import ListItemLink from 'components/ListItemLink'; import globalize from 'scripts/globalize'; -const DLNA_PATHS = [ - '/dashboard/dlna', - '/dashboard/dlna/profiles' -]; - const DevicesDrawerSection = () => { - const location = useLocation(); - - const isDlnaSectionOpen = DLNA_PATHS.includes(location.pathname); - return ( { - + - {isDlnaSectionOpen ? : } - - - - - - - - - - ); }; diff --git a/src/apps/dashboard/routes/_asyncRoutes.ts b/src/apps/dashboard/routes/_asyncRoutes.ts index 9abd6b75e3..0e33b2a0d4 100644 --- a/src/apps/dashboard/routes/_asyncRoutes.ts +++ b/src/apps/dashboard/routes/_asyncRoutes.ts @@ -2,6 +2,7 @@ import { AsyncRouteType, type AsyncRoute } from 'components/router/AsyncRoute'; export const ASYNC_ADMIN_ROUTES: AsyncRoute[] = [ { path: 'activity', type: AsyncRouteType.Dashboard }, + { path: 'dlna', type: AsyncRouteType.Dashboard }, { path: 'notifications', type: AsyncRouteType.Dashboard }, { path: 'users', type: AsyncRouteType.Dashboard }, { path: 'users/access', type: AsyncRouteType.Dashboard }, diff --git a/src/apps/dashboard/routes/_legacyRoutes.ts b/src/apps/dashboard/routes/_legacyRoutes.ts index efdd543a42..6adf825dc3 100644 --- a/src/apps/dashboard/routes/_legacyRoutes.ts +++ b/src/apps/dashboard/routes/_legacyRoutes.ts @@ -31,24 +31,6 @@ export const LEGACY_ADMIN_ROUTES: LegacyRoute[] = [ controller: 'dashboard/devices/device', view: 'dashboard/devices/device.html' } - }, { - path: 'dlna/profiles/edit', - pageProps: { - controller: 'dashboard/dlna/profile', - view: 'dashboard/dlna/profile.html' - } - }, { - path: 'dlna/profiles', - pageProps: { - controller: 'dashboard/dlna/profiles', - view: 'dashboard/dlna/profiles.html' - } - }, { - path: 'dlna', - pageProps: { - controller: 'dashboard/dlna/settings', - view: 'dashboard/dlna/settings.html' - } }, { path: 'plugins/add', pageProps: { diff --git a/src/apps/dashboard/routes/_redirects.ts b/src/apps/dashboard/routes/_redirects.ts index 94211c79c2..b7fdf07218 100644 --- a/src/apps/dashboard/routes/_redirects.ts +++ b/src/apps/dashboard/routes/_redirects.ts @@ -8,8 +8,8 @@ export const REDIRECTS: Redirect[] = [ { from: 'dashboardgeneral.html', to: '/dashboard/settings' }, { from: 'device.html', to: '/dashboard/devices/edit' }, { from: 'devices.html', to: '/dashboard/devices' }, - { from: 'dlnaprofile.html', to: '/dashboard/dlna/profiles/edit' }, - { from: 'dlnaprofiles.html', to: '/dashboard/dlna/profiles' }, + { from: 'dlnaprofile.html', to: '/dashboard/dlna' }, + { from: 'dlnaprofiles.html', to: '/dashboard/dlna' }, { from: 'dlnasettings.html', to: '/dashboard/dlna' }, { from: 'edititemmetadata.html', to: '/metadata' }, { from: 'encodingsettings.html', to: '/dashboard/playback/transcoding' }, diff --git a/src/apps/dashboard/routes/dlna.tsx b/src/apps/dashboard/routes/dlna.tsx new file mode 100644 index 0000000000..fec7d2fdb0 --- /dev/null +++ b/src/apps/dashboard/routes/dlna.tsx @@ -0,0 +1,33 @@ +import Alert from '@mui/material/Alert/Alert'; +import Box from '@mui/material/Box/Box'; +import Button from '@mui/material/Button/Button'; +import React from 'react'; +import { Link } from 'react-router-dom'; + +import Page from 'components/Page'; +import globalize from 'scripts/globalize'; + +const DlnaPage = () => ( + +
+

DLNA

+ + + {globalize.translate('DlnaMovedMessage')} + + + +
+
+); + +export default DlnaPage; diff --git a/src/apps/dashboard/routes/notifications.tsx b/src/apps/dashboard/routes/notifications.tsx index 6f673c753f..7642ee033b 100644 --- a/src/apps/dashboard/routes/notifications.tsx +++ b/src/apps/dashboard/routes/notifications.tsx @@ -1,23 +1,13 @@ +import Alert from '@mui/material/Alert/Alert'; +import Box from '@mui/material/Box/Box'; +import Button from '@mui/material/Button/Button'; import React from 'react'; +import { Link } from 'react-router-dom'; import Page from 'components/Page'; import globalize from 'scripts/globalize'; -const PluginLink = () => ( -