2019-06-03 03:31:38 +00:00
|
|
|
import Vue from 'vue';
|
|
|
|
import VueRouter from 'vue-router';
|
|
|
|
|
|
|
|
import Home from '../components/home/home.vue';
|
|
|
|
import Release from '../components/release/release.vue';
|
2019-11-09 03:43:58 +00:00
|
|
|
import Site from '../components/site/site.vue';
|
|
|
|
import Network from '../components/network/network.vue';
|
2019-06-03 03:31:38 +00:00
|
|
|
import Actor from '../components/actor/actor.vue';
|
2019-11-09 03:43:58 +00:00
|
|
|
import NotFound from '../components/errors/404.vue';
|
2019-06-03 03:31:38 +00:00
|
|
|
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
path: '/',
|
|
|
|
component: Home,
|
2019-07-06 03:29:12 +00:00
|
|
|
name: 'home',
|
2019-06-03 03:31:38 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/scene/:releaseId',
|
|
|
|
component: Release,
|
2019-07-06 03:29:12 +00:00
|
|
|
name: 'release',
|
2019-06-03 03:31:38 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/movie/:releaseId',
|
|
|
|
component: Release,
|
2019-07-06 03:29:12 +00:00
|
|
|
name: 'release',
|
2019-06-03 03:31:38 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/actor/:actorSlug',
|
|
|
|
component: Actor,
|
2019-07-06 03:29:12 +00:00
|
|
|
name: 'actor',
|
2019-06-03 03:31:38 +00:00
|
|
|
},
|
2019-11-09 03:43:58 +00:00
|
|
|
{
|
|
|
|
path: '/site/:siteSlug',
|
|
|
|
component: Site,
|
|
|
|
name: 'site',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/network/:networkSlug',
|
|
|
|
component: Network,
|
|
|
|
name: 'network',
|
|
|
|
},
|
2019-06-03 03:31:38 +00:00
|
|
|
{
|
|
|
|
path: '*',
|
|
|
|
component: NotFound,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
|
mode: 'history',
|
|
|
|
routes,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default router;
|