c3lf-system-3/src/router.js
2019-12-24 14:02:56 +01:00

30 lines
No EOL
856 B
JavaScript

import Items from './views/Items';
import Boxes from './views/Boxes';
import Files from './views/Files';
import Events from './views/Events';
import Error from './views/Error';
import VueRouter from 'vue-router';
import Vue from 'vue';
Vue.use(VueRouter);
const routes = [
{ path: '/', redirect: '/36C3/items' },
{ path: '/howto', component: Error},
{ path: '/admin/files', name: 'files', component: Files},
{ path: '/admin/events', name: 'events', component: Events},
{ path: '/:event/boxes', name: 'boxes', component: Boxes},
{ path: '/:event/items', name: 'items', component: Items},
{ path: '/:event/box/:uid', name: 'boxes', component: Boxes},
{ path: '/:event/item/:uid', name: 'items', component: Items},
{ path: '*', component: Error},
];
const router = new VueRouter({
mode: 'history',
routes
});
export default router;