Files
evening_detective_frontend/src/router/index.ts
T
2026-10-27 14:53:13 +07:00

124 lines
3.0 KiB
TypeScript

import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/playlists',
name: 'playlists',
component: () => import('../views/PlaylistsView.vue'),
},
...(import.meta.env.DEV
? [
{
path: '/design-system',
name: 'design-system',
component: () => import('../views/DesignSystemView.vue'),
},
]
: []),
{
path: '/participation',
name: 'participation',
component: () => import('../views/ParticipationView.vue'),
},
{
path: '/tickets/:token',
name: 'ticket',
component: () => import('../views/TicketView.vue'),
},
{
path: '/',
name: 'home',
component: () => import('../views/HomeView.vue'),
},
{
path: '/login',
name: 'login',
component: () => import('../views/LoginView.vue'),
},
{
path: '/office',
name: 'office',
component: () => import('../views/OfficeView.vue'),
},
{
path: '/user-agreement',
name: 'user-agreement',
component: () => import('../views/UserAgreementView.vue'),
},
{
path: '/privacy-policy',
name: 'privacy-policy',
component: () => import('../views/PrivacyPolicyView.vue'),
},
{
path: '/consent',
name: 'consent',
component: () => import('../views/ConsentView.vue'),
},
{
path: '/games',
name: 'games',
component: () => import('../views/GamesView.vue'),
},
{
path: '/screen',
name: 'screen',
component: () => import('../views/ScreenView.vue'),
},
{
path: '/games/:id/results',
name: 'game-results',
component: () => import('../views/GameResultsView.vue'),
},
{
path: '/games/:id',
name: 'game',
component: () => import('../views/GameView.vue'),
},
{
path: '/team-story/:id',
name: 'team-story',
component: () => import('../views/TeamStoryView.vue'),
},
{
path: '/scenarios',
name: 'scenarios',
component: () => import('../views/ScenariosView.vue'),
},
{
path: '/catalog',
name: 'catalog',
component: () => import('../views/CatalogView.vue'),
},
{
path: '/scenarios/:id/editor', // Динамический параметр id
name: 'scenario-editor',
component: () => import('../views/ScenariosEditorView.vue'),
},
{
path: '/scenarios/:id', // Динамический параметр id
name: 'scenario',
component: () => import('../views/ScenarioView.vue'),
},
{
path: '/tasks',
name: 'tasks',
component: () => import('../views/TasksView.vue'),
},
{
path: '/users',
name: 'users',
component: () => import('../views/UsersView.vue'),
},
{
path: '/reviews',
name: 'reviews',
component: () => import('../views/ReviewsView.vue'),
},
],
})
export default router