2018-03-09 19:46:34 +03:00
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
import Router from 'vue-router';
|
|
|
|
|
import Users from './views/Users';
|
|
|
|
|
|
|
|
|
|
Vue.use(Router);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This is the list of routes where the vuejs app will
|
|
|
|
|
* take over php to provide data
|
|
|
|
|
* You need to forward the php routing (routes.php) to
|
|
|
|
|
* /settings/main.php, where the vue-router will ensure
|
|
|
|
|
* the proper route.
|
|
|
|
|
* ⚠️ Routes needs to match the php routes.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export default new Router({
|
2018-04-09 12:03:21 +03:00
|
|
|
|
mode: 'history',
|
2018-05-10 18:55:08 +03:00
|
|
|
|
// if index.php is in the url AND we got this far, then it's working:
|
|
|
|
|
// let's keep using index.php in the url
|
2018-05-11 10:57:13 +03:00
|
|
|
|
base: OC.generateUrl(''),
|
2018-05-09 16:37:35 +03:00
|
|
|
|
routes: [
|
|
|
|
|
{
|
|
|
|
|
path: '/:index(index.php/)?settings/users',
|
|
|
|
|
component: Users,
|
|
|
|
|
props: true,
|
|
|
|
|
name: 'users',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: ':selectedGroup',
|
|
|
|
|
name: 'group',
|
|
|
|
|
component: Users
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|