Added ProfileMenu

Bit of refactoring
This commit is contained in:
grimsi
2024-05-19 11:48:00 +02:00
parent a61c8eead0
commit 3b72c843db
11 changed files with 206 additions and 108 deletions
+27 -9
View File
@@ -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[];