2020-10-02 07:13:14 +00:00
|
|
|
import { RouteConfig } from 'vue-router';
|
|
|
|
|
|
|
|
const routes: RouteConfig[] = [
|
|
|
|
{
|
|
|
|
path: '/',
|
2020-10-10 21:02:32 +00:00
|
|
|
redirect: 'login',
|
|
|
|
component: () => import('layouts/OutLayout.vue'),
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
name: 'login',
|
|
|
|
path: 'login',
|
|
|
|
component: () => import('pages/Login.vue')
|
2020-10-13 21:13:42 +00:00
|
|
|
},
|
2021-01-18 15:05:05 +00:00
|
|
|
{
|
|
|
|
name: 'password_reset',
|
|
|
|
path: 'reset',
|
|
|
|
component: () => import('pages/Reset.vue')
|
|
|
|
},
|
2020-10-13 21:13:42 +00:00
|
|
|
{
|
|
|
|
name: 'about_out',
|
|
|
|
path: 'about',
|
|
|
|
component: () => import('pages/about/About.vue')
|
2020-10-10 21:02:32 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/main',
|
2020-11-10 00:33:55 +00:00
|
|
|
redirect: 'dashboard',
|
2020-10-02 07:13:14 +00:00
|
|
|
component: () => import('layouts/MainLayout.vue'),
|
2020-11-13 17:48:50 +00:00
|
|
|
meta: { permissions: ['user'] },
|
2020-10-02 07:13:14 +00:00
|
|
|
children: [
|
2020-11-10 00:33:55 +00:00
|
|
|
{
|
|
|
|
name: 'dashboard',
|
|
|
|
path: 'dashboard',
|
2020-11-12 11:47:47 +00:00
|
|
|
meta: { permissions: ['user'] },
|
2020-11-10 00:33:55 +00:00
|
|
|
component: () => import('pages/Dashboard.vue')
|
|
|
|
},
|
2020-10-10 21:02:32 +00:00
|
|
|
{
|
|
|
|
name: 'about',
|
|
|
|
path: 'about',
|
2020-11-12 11:47:47 +00:00
|
|
|
meta: { permissions: ['user'] },
|
2020-10-13 21:13:42 +00:00
|
|
|
component: () => import('pages/about/About.vue')
|
2020-10-10 21:02:32 +00:00
|
|
|
}
|
2020-10-02 07:13:14 +00:00
|
|
|
]
|
|
|
|
},
|
2020-11-13 17:48:50 +00:00
|
|
|
{
|
|
|
|
path: '/error',
|
|
|
|
name: 'error',
|
|
|
|
component: () => import('pages/PluginError.vue')
|
|
|
|
},
|
2020-11-15 17:51:30 +00:00
|
|
|
{
|
|
|
|
path: '/offline',
|
|
|
|
name: 'offline',
|
|
|
|
component: () => import('pages/Offline.vue')
|
|
|
|
},
|
2020-10-02 07:13:14 +00:00
|
|
|
// Always leave this as last one,
|
|
|
|
// but you can also remove it
|
|
|
|
{
|
|
|
|
path: '*',
|
2020-11-15 17:51:30 +00:00
|
|
|
redirect: 'login'
|
2020-10-02 07:13:14 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
export default routes;
|