diff --git a/src/components/pages/UserProfilesPage.tsx b/src/routes/UserProfilesPage.tsx similarity index 82% rename from src/components/pages/UserProfilesPage.tsx rename to src/routes/UserProfilesPage.tsx index d3dcb30cdb..6fad231571 100644 --- a/src/components/pages/UserProfilesPage.tsx +++ b/src/routes/UserProfilesPage.tsx @@ -1,17 +1,18 @@ import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; import React, {FunctionComponent, useEffect, useState, useRef} from 'react'; -import Dashboard from '../../utils/dashboard'; -import globalize from '../../scripts/globalize'; -import loading from '../loading/loading'; -import dom from '../../scripts/dom'; -import confirm from '../../components/confirm/confirm'; -import UserCardBox from '../dashboard/users/UserCardBox'; -import SectionTitleContainer from '../dashboard/elements/SectionTitleContainer'; -import '../../elements/emby-button/emby-button'; -import '../../elements/emby-button/paper-icon-button-light'; -import '../../components/cardbuilder/card.scss'; -import '../../components/indicators/indicators.scss'; -import '../../assets/css/flexstyles.scss'; +import Dashboard from '../utils/dashboard'; +import globalize from '../scripts/globalize'; +import loading from '../components/loading/loading'; +import dom from '../scripts/dom'; +import confirm from '../components/confirm/confirm'; +import UserCardBox from '../components/dashboard/users/UserCardBox'; +import SectionTitleContainer from '../components/dashboard/elements/SectionTitleContainer'; +import '../elements/emby-button/emby-button'; +import '../elements/emby-button/paper-icon-button-light'; +import '../components/cardbuilder/card.scss'; +import '../components/indicators/indicators.scss'; +import '../assets/css/flexstyles.scss'; +import Page from '../components/Page'; type MenuEntry = { name?: string; @@ -74,7 +75,7 @@ const UserProfilesPage: FunctionComponent = () => { icon: 'delete' }); - import('../../components/actionSheet/actionSheet').then(({default: actionsheet}) => { + import('../components/actionSheet/actionSheet').then(({default: actionsheet}) => { actionsheet.show({ items: menuItems, positionTo: card, @@ -130,8 +131,11 @@ const UserProfilesPage: FunctionComponent = () => { }, []); return ( -
-
+ +
{ })}
-
+ + ); }; diff --git a/src/routes/index.tsx b/src/routes/index.tsx index a1cbeadf57..227e5dd7a3 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -4,6 +4,7 @@ import { Route, Routes } from 'react-router-dom'; import ConnectionRequired from '../components/ConnectionRequired'; import NewUserPage from './NewUserPage'; import SearchPage from './search'; +import UserProfilesPage from './UserProfilesPage'; const AppRoutes = () => ( @@ -24,6 +25,14 @@ const AppRoutes = () => ( } /> + + + + } + /> {/* Suppress warnings for unhandled routes */} diff --git a/src/scripts/routes.js b/src/scripts/routes.js index fc5cea83b3..58914350c4 100644 --- a/src/scripts/routes.js +++ b/src/scripts/routes.js @@ -460,14 +460,6 @@ import { appRouter } from '../components/appRouter'; pageComponent: 'UserPasswordPage' }); - defineRoute({ - alias: '/userprofiles.html', - path: 'dashboard/users/userprofiles.html', - autoFocus: false, - roles: 'admin', - pageComponent: 'UserProfilesPage' - }); - defineRoute({ alias: '/wizardremoteaccess.html', path: 'wizard/remote/index.html',