yunohost-admin/app/src/routes.js

55 lines
1.2 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 20:46:27 +02:00
import { UserList, UserCreate, User, UserEdit } from './views/user'
const routes = [
2020-07-15 16:39:24 +02:00
{ name: 'home', path: '/', component: Home },
{ name: 'login', path: '/login', component: Login, meta: { noAuth: true } },
// Users routes
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-15 16:39:24 +02:00
component: User,
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' }
]
}
2020-07-15 16:39:24 +02:00
}
]
export default routes