Changed range toggles to links for home and actor pages.

This commit is contained in:
2020-05-07 03:20:51 +02:00
parent 2b2fb9e3e7
commit 525995615a
10 changed files with 116 additions and 104 deletions

View File

@@ -18,10 +18,24 @@ Vue.use(VueRouter);
const routes = [
{
path: '/',
redirect: { name: 'home' },
redirect: {
name: 'home',
params: {
range: 'latest',
},
},
},
{
path: '/home',
redirect: {
name: 'home',
params: {
range: 'latest',
},
},
},
{
path: '/:range',
component: Home,
name: 'home',
},
@@ -37,8 +51,19 @@ const routes = [
},
{
path: '/actor/:actorSlug',
component: Actor,
name: 'actor',
redirect: from => ({
name: 'actorRange',
params: {
...from.params,
range: 'latest',
},
}),
},
{
path: '/actor/:actorSlug/:range',
component: Actor,
name: 'actorRange',
},
{
path: '/site/:siteSlug',