2020-12-26 22:51:27 +00:00
|
|
|
import { createRouter, createWebHistory } from 'vue-router';
|
2019-06-03 03:31:38 +00:00
|
|
|
|
|
|
|
import Home from '../components/home/home.vue';
|
2021-03-13 03:26:24 +00:00
|
|
|
import Login from '../components/auth/login.vue';
|
|
|
|
import Signup from '../components/auth/signup.vue';
|
2021-03-14 03:54:43 +00:00
|
|
|
import User from '../components/users/user.vue';
|
2020-09-08 00:20:15 +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';
|
2020-08-12 01:30:20 +00:00
|
|
|
import Movies from '../components/releases/movies.vue';
|
2019-12-01 04:32:47 +00:00
|
|
|
import Tag from '../components/tags/tag.vue';
|
|
|
|
import Tags from '../components/tags/tags.vue';
|
2021-03-19 01:36:31 +00:00
|
|
|
import Stash from '../components/stashes/stash.vue';
|
2020-02-26 00:15:50 +00:00
|
|
|
import Search from '../components/search/search.vue';
|
2020-08-15 17:04:33 +00:00
|
|
|
import Stats from '../components/stats/stats.vue';
|
2019-11-09 03:43:58 +00:00
|
|
|
import NotFound from '../components/errors/404.vue';
|
2019-06-03 03:31:38 +00:00
|
|
|
|
|
|
|
const routes = [
|
2020-05-14 02:26:05 +00:00
|
|
|
{
|
|
|
|
path: '/',
|
2021-03-13 03:26:24 +00:00
|
|
|
name: 'home',
|
2020-05-14 02:26:05 +00:00
|
|
|
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
|
|
|
},
|
|
|
|
},
|
2021-03-13 03:26:24 +00:00
|
|
|
{
|
|
|
|
path: '/login',
|
|
|
|
name: 'login',
|
|
|
|
component: Login,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/signup',
|
2021-03-16 01:31:23 +00:00
|
|
|
name: 'signup',
|
2021-03-13 03:26:24 +00:00
|
|
|
component: Signup,
|
|
|
|
},
|
2021-03-14 03:54:43 +00:00
|
|
|
{
|
|
|
|
path: '/user/:username',
|
|
|
|
name: 'user',
|
|
|
|
component: User,
|
|
|
|
},
|
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?',
|
2020-09-08 00:20:15 +00:00
|
|
|
component: Release,
|
2020-05-14 02:26:05 +00:00
|
|
|
name: 'scene',
|
|
|
|
},
|
|
|
|
{
|
2020-09-08 00:20:15 +00:00
|
|
|
path: '/movie/:releaseId/:releaseSlug?',
|
|
|
|
component: Release,
|
2020-05-14 02:26:05 +00:00
|
|
|
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',
|
|
|
|
},
|
2021-03-06 23:01:02 +00:00
|
|
|
{
|
|
|
|
path: '/director/:actorId/:actorSlug',
|
|
|
|
name: 'director',
|
|
|
|
redirect: from => ({
|
|
|
|
name: 'directorRange',
|
|
|
|
params: {
|
|
|
|
...from.params,
|
|
|
|
range: 'latest',
|
|
|
|
pageNumber: 1,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/director/:actorId/:actorSlug',
|
|
|
|
component: Actor,
|
|
|
|
name: 'directorRange',
|
|
|
|
},
|
2020-05-14 02:26:05 +00:00
|
|
|
{
|
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-09-09 02:22:43 +00:00
|
|
|
pageNumber: 1,
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
{
|
2020-09-09 02:22:43 +00:00
|
|
|
path: '/tag/:tagSlug/:range/:pageNumber',
|
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,
|
2020-08-02 01:51:52 +00:00
|
|
|
gender: 'all',
|
2020-05-29 20:43:03 +00:00
|
|
|
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',
|
|
|
|
},
|
|
|
|
{
|
2021-01-03 22:32:09 +00:00
|
|
|
path: '/channels',
|
2020-05-14 02:26:05 +00:00
|
|
|
component: Networks,
|
2021-01-03 22:32:09 +00:00
|
|
|
name: 'channels',
|
2020-05-14 02:26:05 +00:00
|
|
|
},
|
2020-07-25 01:44:19 +00:00
|
|
|
{
|
|
|
|
path: '/movies',
|
|
|
|
component: Movies,
|
|
|
|
name: 'movies',
|
|
|
|
},
|
2020-05-14 02:26:05 +00:00
|
|
|
{
|
|
|
|
path: '/tags',
|
|
|
|
component: Tags,
|
|
|
|
name: 'tags',
|
|
|
|
},
|
2021-03-19 01:36:31 +00:00
|
|
|
{
|
|
|
|
path: '/stash/:stashId/:stashSlug?',
|
|
|
|
component: Stash,
|
|
|
|
name: 'stash',
|
|
|
|
},
|
2020-05-14 02:26:05 +00:00
|
|
|
{
|
|
|
|
path: '/search',
|
|
|
|
component: Search,
|
|
|
|
name: 'search',
|
|
|
|
},
|
2020-08-15 17:04:33 +00:00
|
|
|
{
|
|
|
|
path: '/stats',
|
|
|
|
component: Stats,
|
|
|
|
name: 'stats',
|
|
|
|
},
|
2020-05-14 02:26:05 +00:00
|
|
|
{
|
2020-09-10 01:17:19 +00:00
|
|
|
path: '/not-found',
|
|
|
|
name: 'not-found',
|
2020-05-14 02:26:05 +00:00
|
|
|
component: NotFound,
|
|
|
|
},
|
2020-09-10 01:17:19 +00:00
|
|
|
{
|
2020-12-26 22:51:27 +00:00
|
|
|
path: '/:catchAll(.*)',
|
2020-09-10 01:17:19 +00:00
|
|
|
redirect: {
|
|
|
|
name: 'not-found',
|
|
|
|
},
|
|
|
|
},
|
2019-06-03 03:31:38 +00:00
|
|
|
];
|
|
|
|
|
2020-12-26 22:51:27 +00:00
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHistory(),
|
2020-05-14 02:26:05 +00:00
|
|
|
routes,
|
2019-06-03 03:31:38 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
export default router;
|