2019-12-05 03:32:33 +00:00
|
|
|
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';
|
2023-08-14 13:42:26 +00:00
|
|
|
import HowTo from './views/HowTo';
|
2019-12-05 03:32:33 +00:00
|
|
|
import VueRouter from 'vue-router';
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
const routes = [
|
2023-11-27 00:14:52 +00:00
|
|
|
{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},
|
2019-12-05 03:32:33 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
2023-11-27 00:14:52 +00:00
|
|
|
mode: 'history',
|
|
|
|
routes
|
2019-12-05 03:32:33 +00:00
|
|
|
});
|
|
|
|
|
2023-08-14 13:42:26 +00:00
|
|
|
export default router;
|