c3lf-system-3/web/src/router.js
2023-11-27 01:14:52 +01:00

30 lines
920 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 HowTo from './views/HowTo';
import VueRouter from 'vue-router';
import Vue from 'vue';
Vue.use(VueRouter);
const routes = [
{path: '/', redirect: '/Camp23/items'},
{path: '/howto', name: 'howto', component: HowTo},
{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;