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 21:53:18 +02:00
|
|
|
import { UserList, UserCreate, UserInfo, UserEdit } from './views/user'
|
2020-07-28 18:03:56 +02:00
|
|
|
import { GroupList, GroupCreate } from './views/group'
|
2020-08-05 19:09:48 +02:00
|
|
|
import { DomainList, DomainAdd, DomainInfo } from './views/domain'
|
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
|
|
|
|
2020-07-28 18:03:56 +02:00
|
|
|
/* ───────╮
|
|
|
|
│ USER │
|
|
|
|
╰─────── */
|
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-27 21:53:18 +02:00
|
|
|
component: UserInfo,
|
2020-07-15 16:39:24 +02:00
|
|
|
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-28 18:03:56 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
/* ────────╮
|
|
|
|
│ GROUP │
|
|
|
|
╰──────── */
|
|
|
|
{
|
|
|
|
name: 'group-list',
|
|
|
|
path: '/groups',
|
|
|
|
component: GroupList,
|
|
|
|
meta: {
|
|
|
|
breadcrumb: [
|
|
|
|
{ name: 'user-list', trad: 'users' },
|
|
|
|
{ name: 'group-list', trad: 'groups_and_permissions' }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'group-create',
|
|
|
|
path: '/groups/create',
|
|
|
|
component: GroupCreate,
|
|
|
|
meta: {
|
|
|
|
breadcrumb: [
|
|
|
|
{ name: 'user-list', trad: 'users' },
|
|
|
|
{ name: 'group-list', trad: 'groups_and_permissions' },
|
|
|
|
{ name: 'group-create', trad: 'group_new' }
|
|
|
|
]
|
|
|
|
}
|
2020-08-02 21:22:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
/* ─────────╮
|
|
|
|
│ DOMAIN │
|
|
|
|
╰───────── */
|
|
|
|
{
|
|
|
|
name: 'domain-list',
|
|
|
|
path: '/domains',
|
|
|
|
component: DomainList,
|
|
|
|
meta: {
|
|
|
|
breadcrumb: [
|
|
|
|
{ name: 'domain-list', trad: 'domains' }
|
|
|
|
]
|
|
|
|
}
|
2020-08-04 22:11:30 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'domain-add',
|
|
|
|
path: '/domains/add',
|
|
|
|
component: DomainAdd,
|
|
|
|
meta: {
|
|
|
|
breadcrumb: [
|
|
|
|
{ name: 'domain-list', trad: 'domains' },
|
|
|
|
{ name: 'domain-add', trad: 'domain_add' }
|
|
|
|
]
|
|
|
|
}
|
2020-08-05 19:09:48 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'domain-info',
|
|
|
|
path: '/domains/:name',
|
|
|
|
component: DomainInfo,
|
|
|
|
props: true,
|
|
|
|
meta: {
|
|
|
|
breadcrumb: [
|
|
|
|
{ name: 'domain-list', trad: 'domains' },
|
|
|
|
{ name: 'domain-info', param: 'name' }
|
|
|
|
]
|
|
|
|
}
|
2020-07-15 16:39:24 +02:00
|
|
|
}
|
2020-07-07 13:48:54 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
export default routes
|