Files
cmbone/frontend/src/router/index.ts
T

73 lines
1.7 KiB
TypeScript

import { createRouter, createWebHashHistory, type RouteRecordRaw } from 'vue-router'
const routes: RouteRecordRaw[] = [
{
path: '/login',
name: 'login',
component: () => import('../modules/auth/LoginPage.vue'),
},
{
path: '/second',
name: 'second',
component: () => import('../pages/Home/Index.vue'),
},
{
path: '/',
component: () => import('../layouts/MainLayout.vue'),
redirect: '/dashboard',
children: [
{
path: 'dashboard',
name: 'dashboard',
component: () => import('../modules/dashboard/DashboardPage.vue'),
},
{
path: 'image-optimizer',
name: 'image-optimizer',
component: () => import('../modules/image-optimizer/ImageOptimizerPage.vue'),
},
{
path: 'business/image-optimizer',
redirect: '/image-optimizer',
},
{
path: 'logs',
name: 'logs',
component: () => import('../modules/logs/LogsPage.vue'),
},
{
path: 'logs/audit',
redirect: '/logs',
},
{
path: 'logs/app',
redirect: '/logs',
},
{
path: 'statistics',
name: 'statistics',
component: () => import('../modules/statistics/StatisticsPage.vue'),
},
{
path: 'settings',
name: 'settings',
component: () => import('../modules/settings/SettingsPage.vue'),
},
{
path: 'components',
name: 'components',
component: () => import('../modules/components-demo/ComponentsDemoPage.vue'),
},
],
},
{
path: '/:pathMatch(.*)*',
redirect: '/dashboard',
},
]
export default createRouter({
history: createWebHashHistory(),
routes
})