-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
67 lines (65 loc) · 1.42 KB
/
index.ts
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import BotStats from '@/components/bot/BotStats.vue'
import EditBot from '@/components/bot/EditBot.vue'
import BotApi from '@/components/bot/BotApi.vue'
import BotView from '@/views/BotView.vue'
import BotsView from '@/views/BotsView.vue'
import LogoutView from '@/views/LogoutView.vue'
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
redirect: { name: 'bots' }
},
{
path: '/welcome',
name: 'welcome',
component: () => import('@/views/WelcomeView.vue'),
},
{
path: '/bots',
name: 'bots',
component: BotsView,
},
{
path: '/bots/:id',
name: 'bot',
component: BotView,
children: [
{
path: '',
name: 'editBotHome',
redirect: { name: 'editBot' },
},
{
name: 'editBot',
path: 'info',
component: EditBot,
},
{
name: 'botApi',
path: 'api',
component: BotApi,
},
{
name: 'botStats',
path: 'stats',
component: BotStats,
},
],
},
{
path: '/bots/new',
name: 'newBot',
component: BotView,
},
{
path: '/logout',
name: 'logout',
component: LogoutView
}
]
})
export default router