2020-07-07 13:48:54 +02:00
|
|
|
import Home from './views/Home'
|
2020-07-08 18:08:07 +02:00
|
|
|
import Login from './views/Login'
|
2020-07-27 20:46:27 +02:00
|
|
|
import { UserList, UserCreate, User, UserEdit } from './views/user'
|
2020-07-07 13:48:54 +02:00
|
|
|
|
|
|
|
const routes = [
|
2020-07-15 16:39:24 +02:00
|
|
|
{ name: 'home', path: '/', component: Home },
|
|
|
|
{ name: 'login', path: '/login', component: Login, meta: { noAuth: true } },
|
2020-07-15 17:30:09 +02:00
|
|
|
|
|
|
|
// Users routes
|
2020-07-15 16:39:24 +02:00
|
|
|
{
|
2020-07-15 17:30:09 +02:00
|
|
|
name: 'user-list',
|
2020-07-15 16:39:24 +02:00
|
|
|
path: '/users',
|
2020-07-15 17:30:09 +02:00
|
|
|
component: UserList,
|
|
|
|
meta: { breadcrumb: [{ name: 'user-list', trad: 'users' }] }
|
2020-07-15 16:39:24 +02:00
|
|
|
},
|
2020-07-16 14:49:34 +02:00
|
|
|
{
|
|
|
|
name: 'user-create',
|
|
|
|
path: '/users/create',
|
|
|
|
component: UserCreate,
|
|
|
|
meta: {
|
|
|
|
breadcrumb: [
|
|
|
|
{ name: 'user-list', trad: 'users' },
|
|
|
|
{ name: 'user-create', trad: 'users_new' }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2020-07-15 16:39:24 +02:00
|
|
|
{
|
2020-07-15 17:30:09 +02:00
|
|
|
name: 'user-info',
|
2020-07-16 14:49:34 +02:00
|
|
|
path: '/users/:name',
|
2020-07-15 16:39:24 +02:00
|
|
|
component: User,
|
|
|
|
props: true,
|
|
|
|
meta: {
|
|
|
|
breadcrumb: [
|
2020-07-15 17:30:09 +02:00
|
|
|
{ name: 'user-list', trad: 'users' },
|
|
|
|
{ name: 'user-info', param: 'name' }
|
2020-07-15 16:39:24 +02:00
|
|
|
]
|
|
|
|
}
|
2020-07-27 20:46:27 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'user-edit',
|
|
|
|
path: '/users/:name/edit',
|
|
|
|
component: UserEdit,
|
|
|
|
props: true,
|
|
|
|
meta: {
|
|
|
|
breadcrumb: [
|
|
|
|
{ name: 'user-list', trad: 'users' },
|
|
|
|
{ name: 'user-info', param: 'name' },
|
|
|
|
{ name: 'user-edit', param: 'name', trad: 'user_username_edit' }
|
|
|
|
]
|
|
|
|
}
|
2020-07-15 16:39:24 +02:00
|
|
|
}
|
2020-07-07 13:48:54 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
export default routes
|