Update AppType values

This commit is contained in:
Bill Thornton
2026-06-30 12:04:16 -04:00
parent 09d4fe86a1
commit fad0c5ca19
4 changed files with 23 additions and 18 deletions
+12 -12
View File
@@ -2,20 +2,20 @@ import { AsyncRoute } from 'components/router/AsyncRoute';
import { AppType } from 'constants/appType';
export const ASYNC_USER_ROUTES: AsyncRoute[] = [
{ path: 'home', type: AppType.Experimental },
{ path: 'homevideos', type: AppType.Experimental },
{ path: 'livetv', type: AppType.Experimental },
{ path: 'movies', type: AppType.Experimental },
{ path: 'music', type: AppType.Experimental },
{ path: 'books', type: AppType.Experimental },
{ path: 'musicvideos', type: AppType.Experimental },
{ path: 'boxsets', type: AppType.Experimental },
{ path: 'playlists', type: AppType.Experimental },
{ path: 'mixed', type: AppType.Experimental },
{ path: 'mypreferencesdisplay', page: 'user/display', type: AppType.Experimental },
{ path: 'home', type: AppType.Modern },
{ path: 'homevideos', type: AppType.Modern },
{ path: 'livetv', type: AppType.Modern },
{ path: 'movies', type: AppType.Modern },
{ path: 'music', type: AppType.Modern },
{ path: 'books', type: AppType.Modern },
{ path: 'musicvideos', type: AppType.Modern },
{ path: 'boxsets', type: AppType.Modern },
{ path: 'playlists', type: AppType.Modern },
{ path: 'mixed', type: AppType.Modern },
{ path: 'mypreferencesdisplay', page: 'user/display', type: AppType.Modern },
{ path: 'mypreferencesmenu', page: 'user/settings' },
{ path: 'quickconnect', page: 'quickConnect' },
{ path: 'search' },
{ path: 'tv', page: 'shows', type: AppType.Experimental },
{ path: 'tv', page: 'shows', type: AppType.Modern },
{ path: 'userprofile', page: 'user/userprofile' }
];
+3 -3
View File
@@ -18,9 +18,9 @@ const importRoute = (page: string, type: AppType) => {
switch (type) {
case AppType.Dashboard:
return import(/* webpackChunkName: "[request]" */ `../../apps/dashboard/routes/${page}`);
case AppType.Experimental:
case AppType.Modern:
return import(/* webpackChunkName: "[request]" */ `../../apps/modern/routes/${page}`);
case AppType.Stable:
case AppType.Legacy:
return import(/* webpackChunkName: "[request]" */ `../../apps/legacy/routes/${page}`);
}
};
@@ -28,7 +28,7 @@ const importRoute = (page: string, type: AppType) => {
export const toAsyncPageRoute = ({
path,
page,
type = AppType.Stable
type = AppType.Legacy
}: AsyncRoute): RouteObject => {
return {
path,
@@ -80,7 +80,7 @@ const loadView = async (
* NOTE: Any new pages should use the generic Page component instead.
*/
const ViewManagerPage: FunctionComponent<ViewManagerPageProps> = ({
appType = AppType.Stable,
appType = AppType.Legacy,
controller,
view,
type,
+7 -2
View File
@@ -1,9 +1,14 @@
/**
* App types represented in src/apps.
* Used in route definitions to determine where to load relevant components from.
*/
export enum AppType {
/** The admin dashboard app. */
Dashboard = 'dashboard',
Experimental = 'experimental',
Stable = 'stable',
/** The legacy app. */
Legacy = 'legacy',
/** The modern React app. */
Modern = 'modern',
/** The startup wizard app. */
Wizard = 'wizard'
}