blob: e90a8fd52a72065fd9884d6963150215ead5c5ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*
* Authors: see git history
*
* Copyright (c) 2010 Authors
* Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
*
*/
import { createWebHashHistory, createRouter } from 'vue-router'
const routes = [
{
path: '/simulator',
name: 'simulator',
component: () => import('../components/Simulator.vue')
},
{
path: '/preferences',
name: 'preferences',
component: () => import('../components/Preferences.vue')
},
{
path: '/:pathMatch(.*)*',
name: 'NotFound',
component: () => import('../components/NotFound.vue')
},
]
const router = createRouter({
history: createWebHashHistory(),
routes
})
// Sets title for each routes
const DEFAULT_TITLE = 'Ink/Stitch';
router.beforeEach((to) => {
document.title = to.meta.title || DEFAULT_TITLE
})
export default router
|