mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 08:15:48 +00:00
Added ProfileMenu
Bit of refactoring
This commit is contained in:
+27
-9
@@ -4,20 +4,38 @@ import LoginView from "Frontend/views/LoginView";
|
||||
import MainLayout from "Frontend/views/MainLayout";
|
||||
import TestView from "Frontend/views/TestView";
|
||||
import SetupView from "Frontend/views/SetupView";
|
||||
import ProfileView from "Frontend/views/ProfileView";
|
||||
import {ThemeSelector} from "Frontend/components/theming/ThemeSelector";
|
||||
import App from "Frontend/App";
|
||||
|
||||
export const routes = protectRoutes([
|
||||
{
|
||||
element: <MainLayout/>,
|
||||
handle: {requiresLogin: true},
|
||||
element: <App/>,
|
||||
handle: {requiresLogin: false},
|
||||
children: [
|
||||
{path: '/', element: <TestView/>, handle: {title: 'Gameyfin - Test'}},
|
||||
{
|
||||
element: <MainLayout/>,
|
||||
handle: {requiresLogin: true},
|
||||
children: [
|
||||
{
|
||||
index: true, element: <TestView/>
|
||||
},
|
||||
{
|
||||
path: 'profile',
|
||||
element: <ProfileView/>,
|
||||
children: [
|
||||
{path: 'appearance', element: <ThemeSelector/>}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/login', element: <LoginView/>, handle: {requiresLogin: false}
|
||||
},
|
||||
{
|
||||
path: '/setup', element: <SetupView/>, handle: {requiresLogin: false}
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/login', element: <LoginView/>, handle: {requiresLogin: false}
|
||||
},
|
||||
{
|
||||
path: '/setup', element: <SetupView/>, handle: {requiresLogin: false}
|
||||
}
|
||||
]) as RouteObject[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user