yunohost-admin/app/src/routes.js

123 lines
2.7 KiB
JavaScript
Raw Normal View History

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'
import { GroupList, GroupCreate } from './views/group'
import { DomainList, DomainAdd, DomainInfo } from './views/domain'
const routes = [
2020-07-15 16:39:24 +02:00
{ name: 'home', path: '/', component: Home },
{ name: 'login', path: '/login', component: Login, meta: { noAuth: true } },
/*
USER
*/
2020-07-15 16:39:24 +02:00
{
name: 'user-list',
2020-07-15 16:39:24 +02:00
path: '/users',
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
{
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: [
{ 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' }
]
}
},
/*
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' }
]
}
},
/*
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' }
]
}
},
{
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
}
]
export default routes