c3lf-system-3/src/router.js

30 lines
856 B
JavaScript
Raw Normal View History

import Items from './views/Items';
2019-12-05 22:27:24 +00:00
import Boxes from './views/Boxes';
2019-12-24 13:02:56 +00:00
import Files from './views/Files';
import Events from './views/Events';
2019-12-05 22:27:24 +00:00
import Error from './views/Error';
import VueRouter from 'vue-router';
import Vue from 'vue';
Vue.use(VueRouter);
const routes = [
2019-12-12 16:53:37 +00:00
{ path: '/', redirect: '/36C3/items' },
{ path: '/howto', component: Error},
2019-12-24 13:02:56 +00:00
{ path: '/admin/files', name: 'files', component: Files},
{ path: '/admin/events', name: 'events', component: Events},
2019-12-12 16:53:37 +00:00
{ path: '/:event/boxes', name: 'boxes', component: Boxes},
{ path: '/:event/items', name: 'items', component: Items},
2019-12-24 13:02:56 +00:00
{ path: '/:event/box/:uid', name: 'boxes', component: Boxes},
{ path: '/:event/item/:uid', name: 'items', component: Items},
2019-12-05 22:27:24 +00:00
{ path: '*', component: Error},
];
const router = new VueRouter({
mode: 'history',
routes
});
export default router;