1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Use react user pages in stable app

This commit is contained in:
Bill Thornton 2023-05-02 01:42:23 -04:00
parent 1224ba7ec4
commit 023dd384cf
29 changed files with 23 additions and 1851 deletions

View file

@ -1,10 +1,10 @@
import { AsyncRoute, AsyncRouteType } from '../../../../components/router/AsyncRoute';
import { AsyncRoute } from '../../../../components/router/AsyncRoute';
export const ASYNC_ADMIN_ROUTES: AsyncRoute[] = [
{ path: 'usernew.html', page: 'user/usernew', type: AsyncRouteType.Experimental },
{ path: 'userprofiles.html', page: 'user/userprofiles', type: AsyncRouteType.Experimental },
{ path: 'useredit.html', page: 'user/useredit', type: AsyncRouteType.Experimental },
{ path: 'userlibraryaccess.html', page: 'user/userlibraryaccess', type: AsyncRouteType.Experimental },
{ path: 'userparentalcontrol.html', page: 'user/userparentalcontrol', type: AsyncRouteType.Experimental },
{ path: 'userpassword.html', page: 'user/userpassword', type: AsyncRouteType.Experimental }
{ path: 'usernew.html', page: 'user/usernew' },
{ path: 'userprofiles.html', page: 'user/userprofiles' },
{ path: 'useredit.html', page: 'user/useredit' },
{ path: 'userlibraryaccess.html', page: 'user/userlibraryaccess' },
{ path: 'userparentalcontrol.html', page: 'user/userparentalcontrol' },
{ path: 'userpassword.html', page: 'user/userpassword' }
];

View file

@ -2,7 +2,7 @@ import { AsyncRoute, AsyncRouteType } from '../../../../components/router/AsyncR
export const ASYNC_USER_ROUTES: AsyncRoute[] = [
{ path: 'search.html', page: 'search' },
{ path: 'userprofile.html', page: 'user/userprofile', type: AsyncRouteType.Experimental },
{ path: 'userprofile.html', page: 'user/userprofile' },
{ path: 'home.html', page: 'home', type: AsyncRouteType.Experimental },
{ path: 'movies.html', page: 'movies', type: AsyncRouteType.Experimental }
];

View file

@ -5,7 +5,7 @@ import ConnectionRequired from '../../../components/ConnectionRequired';
import ServerContentPage from '../../../components/ServerContentPage';
import { toAsyncPageRoute } from '../../../components/router/AsyncRoute';
import { toViewManagerPageRoute } from '../../../components/router/LegacyRoute';
import { ASYNC_USER_ROUTES } from './asyncRoutes';
import { ASYNC_ADMIN_ROUTES, ASYNC_USER_ROUTES } from './asyncRoutes';
import { LEGACY_ADMIN_ROUTES, LEGACY_PUBLIC_ROUTES, LEGACY_USER_ROUTES } from './legacyRoutes';
export const AppRoutes = () => (
@ -19,6 +19,7 @@ export const AppRoutes = () => (
{/* Admin routes */}
<Route path='/' element={<ConnectionRequired isAdminRequired />}>
{ASYNC_ADMIN_ROUTES.map(toAsyncPageRoute)}
{LEGACY_ADMIN_ROUTES.map(toViewManagerPageRoute)}
<Route path='configurationpage' element={

View file

@ -0,0 +1,10 @@
import { AsyncRoute } from '../../../../components/router/AsyncRoute';
export const ASYNC_ADMIN_ROUTES: AsyncRoute[] = [
{ path: 'usernew.html', page: 'user/usernew' },
{ path: 'userprofiles.html', page: 'user/userprofiles' },
{ path: 'useredit.html', page: 'user/useredit' },
{ path: 'userlibraryaccess.html', page: 'user/userlibraryaccess' },
{ path: 'userparentalcontrol.html', page: 'user/userparentalcontrol' },
{ path: 'userpassword.html', page: 'user/userpassword' }
];

View file

@ -1 +1,2 @@
export * from './admin';
export * from './user';

View file

@ -1,5 +1,6 @@
import { AsyncRoute } from '../../../../components/router/AsyncRoute';
export const ASYNC_USER_ROUTES: AsyncRoute[] = [
{ path: 'search.html', page: 'search' }
{ path: 'search.html', page: 'search' },
{ path: 'userprofile.html', page: 'user/userprofile' }
];

View file

@ -193,41 +193,5 @@ export const LEGACY_ADMIN_ROUTES: LegacyRoute[] = [
view: 'dashboard/streaming.html',
controller: 'dashboard/streaming'
}
}, {
path: 'usernew.html',
pageProps: {
view: 'dashboard/users/usernew.html',
controller: 'dashboard/users/usernew'
}
}, {
path: 'userprofiles.html',
pageProps: {
view: 'dashboard/users/userprofiles.html',
controller: 'dashboard/users/userprofilespage'
}
}, {
path: 'useredit.html',
pageProps: {
view: 'dashboard/users/useredit.html',
controller: 'dashboard/users/useredit'
}
}, {
path: 'userlibraryaccess.html',
pageProps: {
view: 'dashboard/users/userlibraryaccess.html',
controller: 'dashboard/users/userlibraryaccess'
}
}, {
path: 'userparentalcontrol.html',
pageProps: {
view: 'dashboard/users/userparentalcontrol.html',
controller: 'dashboard/users/userparentalcontrol'
}
}, {
path: 'userpassword.html',
pageProps: {
view: 'dashboard/users/userpassword.html',
controller: 'dashboard/users/userpasswordpage'
}
}
];

View file

@ -92,12 +92,6 @@ export const LEGACY_USER_ROUTES: LegacyRoute[] = [
isNowPlayingBarEnabled: false,
isThemeMediaSupported: true
}
}, {
path: 'userprofile.html',
pageProps: {
controller: 'user/profile/index',
view: 'user/profile/index.html'
}
}, {
path: 'home.html',
pageProps: {