2019-06-03 03:31:38 +00:00
|
|
|
import Vue from 'vue';
|
|
|
|
import VueRouter from 'vue-router';
|
|
|
|
|
|
|
|
import Home from '../components/home/home.vue';
|
2019-12-13 02:57:01 +00:00
|
|
|
import Release from '../components/releases/release.vue';
|
2020-01-05 00:07:32 +00:00
|
|
|
import Site from '../components/sites/site.vue';
|
2019-11-30 04:55:32 +00:00
|
|
|
import Network from '../components/networks/network.vue';
|
|
|
|
import Networks from '../components/networks/networks.vue';
|
|
|
|
import Actor from '../components/actors/actor.vue';
|
|
|
|
import Actors from '../components/actors/actors.vue';
|
2019-12-01 04:32:47 +00:00
|
|
|
import Tag from '../components/tags/tag.vue';
|
|
|
|
import Tags from '../components/tags/tags.vue';
|
2020-02-26 00:15:50 +00:00
|
|
|
import Search from '../components/search/search.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 = [
|
2020-05-14 02:26:05 +00:00
|
|
|
{
|
|
|
|
path: '/',
|
|
|
|
redirect: {
|
|
|
|
name: 'latest',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/home',
|
|
|
|
redirect: {
|
|
|
|
name: 'latest',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/latest',
|
|
|
|
component: Home,
|
|
|
|
name: 'latest',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/upcoming',
|
|
|
|
component: Home,
|
|
|
|
name: 'upcoming',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/new',
|
|
|
|
component: Home,
|
|
|
|
name: 'new',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/scene/:releaseId/:releaseSlug?',
|
|
|
|
component: Release,
|
|
|
|
name: 'scene',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/movie/:releaseId/:releaseSlug?',
|
|
|
|
component: Release,
|
|
|
|
name: 'movie',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/actor/:actorSlug',
|
|
|
|
name: 'actor',
|
|
|
|
redirect: from => ({
|
|
|
|
name: 'actorRange',
|
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/actor/:actorSlug/:range',
|
|
|
|
component: Actor,
|
|
|
|
name: 'actorRange',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/site/:siteSlug',
|
|
|
|
component: Site,
|
|
|
|
name: 'site',
|
|
|
|
redirect: from => ({
|
|
|
|
name: 'siteRange',
|
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/site/:siteSlug/:range',
|
|
|
|
component: Site,
|
|
|
|
name: 'siteRange',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/network/:networkSlug',
|
|
|
|
component: Network,
|
|
|
|
name: 'network',
|
|
|
|
redirect: from => ({
|
|
|
|
name: 'networkRange',
|
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/network/:networkSlug/:range',
|
|
|
|
component: Network,
|
|
|
|
name: 'networkRange',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/tag/:tagSlug',
|
|
|
|
component: Tag,
|
|
|
|
name: 'tag',
|
|
|
|
redirect: from => ({
|
|
|
|
name: 'tagRange',
|
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/tag/:tagSlug/:range',
|
|
|
|
component: Tag,
|
|
|
|
name: 'tagRange',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/actors/:gender?/:letter?',
|
|
|
|
component: Actors,
|
|
|
|
name: 'actors',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/networks',
|
|
|
|
component: Networks,
|
|
|
|
name: 'networks',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/tags',
|
|
|
|
component: Tags,
|
|
|
|
name: 'tags',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/search',
|
|
|
|
component: Search,
|
|
|
|
name: 'search',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '*',
|
|
|
|
component: NotFound,
|
|
|
|
},
|
2019-06-03 03:31:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
2020-05-14 02:26:05 +00:00
|
|
|
mode: 'history',
|
|
|
|
routes,
|
2019-06-03 03:31:38 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
export default router;
|