59 lines
1.1 KiB
JavaScript
59 lines
1.1 KiB
JavaScript
import Vue from 'vue';
|
|
import Router from 'vue-router';
|
|
import Lines from './views/Lines.vue';
|
|
import LineStations from './views/LineStations.vue';
|
|
import Doors from './views/Doors.vue';
|
|
import Stations from './views/Stations.vue';
|
|
import Station from './views/Station.vue';
|
|
import About from './views/About.vue';
|
|
import NotFound from './views/NotFound.vue';
|
|
|
|
Vue.use(Router);
|
|
|
|
export default new Router({
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
redirect: '/lines',
|
|
},
|
|
{
|
|
path: '/lines',
|
|
name: 'Lines',
|
|
component: Lines,
|
|
},
|
|
{
|
|
path: '/line/:line/:dest',
|
|
name: 'LineStations',
|
|
component: LineStations,
|
|
},
|
|
{
|
|
path: '/doors/:line/:dest/:station',
|
|
name: 'Doors',
|
|
component: Doors,
|
|
},
|
|
{
|
|
path: '/stations',
|
|
name: 'Stations',
|
|
component: Stations,
|
|
},
|
|
{
|
|
path: '/station/:station',
|
|
name: 'Station',
|
|
component: Station,
|
|
},
|
|
{
|
|
path: '/about',
|
|
name: 'About',
|
|
component: About,
|
|
},
|
|
{
|
|
path: '/404',
|
|
component: NotFound,
|
|
},
|
|
{
|
|
path: '*',
|
|
redirect: '/404',
|
|
},
|
|
],
|
|
});
|