|
- import Vue from 'vue'
- import VueRouter from 'vue-router'
-
- Vue.use(VueRouter)
-
- const routes = [
- {
- path: '/',
- name: 'Home',
- component: () => import('../views/Home.vue')
- },
- {
- path: '/event/gtblank-init',
- name: 'GtblankInit',
- meta: { title: 'gtblank - init (content warning: flashy lights)' },
- component: () => import('../views/events/gtblank-init/GtblankInit.vue')
- },
- {
- path: '/event/gtblank-init/directions',
- name: 'GtblankInit',
- meta: { title: 'gtblank - init >> directions' },
- component: () => import('../views/events/gtblank-init/GtBlankDirections.vue')
- },
- // {
- // path: '/event/okt28',
- // name: 'Okt28',
- // component: () => import('../views/events/okt-28/Okt28.vue')
- // },
- {
- path: '/event/ignaz',
- name: 'Ignaz',
- component: () => import('../views/events/ignaz/Ignaz.vue')
- },
- {
- path: '/cancel/:token',
- name: 'Cancel',
- component: () => import('../views/Cancel.vue')
- },
- {
- path: '/reservation/:token',
- name: 'Reservation',
- component: () => import('../views/Reservation.vue')
- },
- {
- path: '/invalidate',
- name: 'Reservation',
- component: () => import('../views/Invalidate.vue')
- },
- {
- path: '/reservations/:secret',
- name: 'Reservations',
- component: () => import('../views/Reservations.vue')
- }
- ]
-
- const router = new VueRouter({
- mode: 'hash',
- base: process.env.BASE_URL,
- routes
- })
-
- const DEFAULT_TITLE = 'event reservation';
- router.afterEach((to) => {
- // Use next tick to handle router history correctly
- // see: https://github.com/vuejs/vue-router/issues/914#issuecomment-384477609
- Vue.nextTick(() => {
- document.title = to.meta.title || DEFAULT_TITLE;
- });
- });
-
-
- export default router
|