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-06-27 02:50:13 +00:00
|
|
|
import Entity from '../components/entities/entity.vue';
|
2019-11-30 04:55:32 +00:00
|
|
|
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: {
|
2020-05-27 01:04:18 +00:00
|
|
|
name: 'updates',
|
2020-05-22 02:32:16 +00:00
|
|
|
params: {
|
2020-05-26 23:40:10 +00:00
|
|
|
range: 'latest',
|
2020-06-27 02:50:13 +00:00
|
|
|
tags: 'all',
|
2020-05-23 02:32:50 +00:00
|
|
|
pageNumber: 1,
|
2020-05-22 02:32:16 +00:00
|
|
|
},
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2020-05-27 01:04:18 +00:00
|
|
|
path: '/updates',
|
|
|
|
redirect: {
|
|
|
|
name: 'updates',
|
|
|
|
params: {
|
|
|
|
range: 'latest',
|
|
|
|
pageNumber: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2020-06-29 01:55:10 +00:00
|
|
|
path: '/updates/:range/:pageNumber',
|
2020-05-14 02:26:05 +00:00
|
|
|
component: Home,
|
2020-05-27 01:04:18 +00:00
|
|
|
name: 'updates',
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/scene/:releaseId/:releaseSlug?',
|
|
|
|
component: Release,
|
|
|
|
name: 'scene',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/movie/:releaseId/:releaseSlug?',
|
|
|
|
component: Release,
|
|
|
|
name: 'movie',
|
|
|
|
},
|
|
|
|
{
|
2020-05-27 01:04:18 +00:00
|
|
|
path: '/actor/:actorId/:actorSlug',
|
2020-05-14 02:26:05 +00:00
|
|
|
name: 'actor',
|
|
|
|
redirect: from => ({
|
|
|
|
name: 'actorRange',
|
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
2020-05-26 23:40:10 +00:00
|
|
|
pageNumber: 1,
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
2020-06-29 01:55:10 +00:00
|
|
|
path: '/actor/:actorId/:actorSlug/:range/:pageNumber',
|
2020-05-14 02:26:05 +00:00
|
|
|
component: Actor,
|
|
|
|
name: 'actorRange',
|
|
|
|
},
|
|
|
|
{
|
2020-06-27 02:50:13 +00:00
|
|
|
path: '/channel/:entitySlug',
|
2020-05-14 02:26:05 +00:00
|
|
|
redirect: from => ({
|
2020-06-27 02:50:13 +00:00
|
|
|
name: 'channel',
|
2020-05-14 02:26:05 +00:00
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
2020-05-26 23:40:10 +00:00
|
|
|
pageNumber: 1,
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
2020-06-29 01:55:10 +00:00
|
|
|
path: '/channel/:entitySlug/:range/:pageNumber',
|
2020-06-27 02:50:13 +00:00
|
|
|
component: Entity,
|
|
|
|
name: 'channel',
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
|
|
|
{
|
2020-06-27 02:50:13 +00:00
|
|
|
path: '/network/:entitySlug',
|
2020-05-14 02:26:05 +00:00
|
|
|
redirect: from => ({
|
2020-06-27 02:50:13 +00:00
|
|
|
name: 'network',
|
2020-05-14 02:26:05 +00:00
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
2020-05-26 02:11:29 +00:00
|
|
|
pageNumber: 1,
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
2020-06-29 01:55:10 +00:00
|
|
|
path: '/network/:entitySlug/:range/:pageNumber',
|
2020-06-27 02:50:13 +00:00
|
|
|
component: Entity,
|
|
|
|
name: 'network',
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
2020-06-30 22:25:27 +00:00
|
|
|
{
|
|
|
|
path: '/studio/:entitySlug',
|
|
|
|
redirect: from => ({
|
|
|
|
name: 'studio',
|
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
|
|
|
pageNumber: 1,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/studio/:entitySlug/:range/:pageNumber',
|
|
|
|
component: Entity,
|
|
|
|
name: 'studio',
|
|
|
|
},
|
2020-05-14 02:26:05 +00:00
|
|
|
{
|
|
|
|
path: '/tag/:tagSlug',
|
|
|
|
redirect: from => ({
|
2020-05-29 20:43:03 +00:00
|
|
|
name: 'tag',
|
2020-05-14 02:26:05 +00:00
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
2020-06-29 23:07:48 +00:00
|
|
|
path: '/tag/:tagSlug/:range',
|
2020-05-14 02:26:05 +00:00
|
|
|
component: Tag,
|
2020-05-29 20:43:03 +00:00
|
|
|
name: 'tag',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/actors',
|
|
|
|
redirect: from => ({
|
|
|
|
name: 'actors',
|
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
gender: 'female',
|
|
|
|
letter: 'all',
|
2020-06-27 02:50:13 +00:00
|
|
|
tags: 'all',
|
2020-05-29 20:43:03 +00:00
|
|
|
range: 'latest',
|
|
|
|
pageNumber: 1,
|
|
|
|
},
|
|
|
|
}),
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
|
|
|
{
|
2020-05-27 01:04:18 +00:00
|
|
|
path: '/actors/:gender?/:letter?/:pageNumber',
|
2020-05-14 02:26:05 +00:00
|
|
|
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;
|