mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-07-30 15:39:06 +02:00
dedicated homepage, updated qr page, added counter, clickable logo
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
import Landing from '../views/Landing.vue'
|
||||
import Map from '../views/Map.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
@@ -16,7 +17,12 @@ const router = createRouter({
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: HomeView
|
||||
component: Landing
|
||||
},
|
||||
{
|
||||
path: '/map',
|
||||
name: 'map',
|
||||
component: Map
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
@@ -69,4 +75,13 @@ const router = createRouter({
|
||||
]
|
||||
})
|
||||
|
||||
// backward compatibility with old url scheme
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.path === '/' && to.hash) {
|
||||
next({ path: '/map', hash: to.hash })
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user