71 lines
1.6 KiB
TypeScript
71 lines
1.6 KiB
TypeScript
import { RouteRecordRaw } from 'vue-router';
|
|
|
|
const routes: RouteRecordRaw[] = [
|
|
{
|
|
path: '/',
|
|
redirect: 'login',
|
|
component: () => import('layouts/OutLayout.vue'),
|
|
children: [
|
|
{
|
|
name: 'login',
|
|
path: 'login',
|
|
component: () => import('pages/Login.vue'),
|
|
props: true,
|
|
},
|
|
{
|
|
name: 'password_reset',
|
|
path: 'reset',
|
|
component: () => import('pages/Reset.vue'),
|
|
},
|
|
{
|
|
path: '/setup-backend',
|
|
name: 'setup_backend',
|
|
redirect: { name: 'login', params: { backendSetup: 1 } },
|
|
},
|
|
{
|
|
name: 'about_out',
|
|
path: 'about',
|
|
component: () => import('pages/about/About.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/in',
|
|
redirect: 'dashboard',
|
|
component: () => import('layouts/MainLayout.vue'),
|
|
meta: { permissions: ['user'] },
|
|
children: [
|
|
{
|
|
name: 'dashboard',
|
|
path: 'dashboard',
|
|
meta: { permissions: ['user'] },
|
|
component: () => import('pages/Dashboard.vue'),
|
|
},
|
|
{
|
|
name: 'about',
|
|
path: 'about',
|
|
meta: { permissions: ['user'] },
|
|
component: () => import('pages/about/About.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/error',
|
|
name: 'error',
|
|
component: () => import('pages/PluginError.vue'),
|
|
},
|
|
{
|
|
path: '/offline',
|
|
name: 'offline',
|
|
component: () => import('pages/Offline.vue'),
|
|
},
|
|
// Always leave this as last one,
|
|
// but you can also remove it
|
|
{
|
|
path: '/:catchAll(.*)*',
|
|
redirect: 'login',
|
|
},
|
|
];
|
|
|
|
export default routes;
|