25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

73 satır
1.7 KiB

  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. Vue.use(VueRouter)
  4. const routes = [
  5. {
  6. path: '/',
  7. name: 'Home',
  8. component: () => import('../views/Home.vue')
  9. },
  10. {
  11. path: '/event/gtblank-init',
  12. name: 'GtblankInit',
  13. meta: { title: 'gtblank - init (content warning: flashy lights)' },
  14. component: () => import('../views/events/gtblank-init/GtblankInit.vue')
  15. },
  16. {
  17. path: '/event/gtblank-init/directions',
  18. name: 'GtblankInit',
  19. meta: { title: 'gtblank - init >> directions' },
  20. component: () => import('../views/events/gtblank-init/GtBlankDirections.vue')
  21. },
  22. // {
  23. // path: '/event/okt28',
  24. // name: 'Okt28',
  25. // component: () => import('../views/events/okt-28/Okt28.vue')
  26. // },
  27. {
  28. path: '/event/ignaz',
  29. name: 'Ignaz',
  30. component: () => import('../views/events/ignaz/Ignaz.vue')
  31. },
  32. {
  33. path: '/cancel/:token',
  34. name: 'Cancel',
  35. component: () => import('../views/Cancel.vue')
  36. },
  37. {
  38. path: '/reservation/:token',
  39. name: 'Reservation',
  40. component: () => import('../views/Reservation.vue')
  41. },
  42. {
  43. path: '/invalidate',
  44. name: 'Reservation',
  45. component: () => import('../views/Invalidate.vue')
  46. },
  47. {
  48. path: '/reservations/:secret',
  49. name: 'Reservations',
  50. component: () => import('../views/Reservations.vue')
  51. }
  52. ]
  53. const router = new VueRouter({
  54. mode: 'hash',
  55. base: process.env.BASE_URL,
  56. routes
  57. })
  58. const DEFAULT_TITLE = 'event reservation';
  59. router.afterEach((to) => {
  60. // Use next tick to handle router history correctly
  61. // see: https://github.com/vuejs/vue-router/issues/914#issuecomment-384477609
  62. Vue.nextTick(() => {
  63. document.title = to.meta.title || DEFAULT_TITLE;
  64. });
  65. });
  66. export default router