summaryrefslogtreecommitdiffstats
path: root/src/router/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/router/index.js')
-rw-r--r--src/router/index.js25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/router/index.js b/src/router/index.js
index 99056906..6dd62c92 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -34,6 +34,8 @@ const Folders = () => import('../views/Folders')
const Albums = () => import('../views/Albums')
const AlbumContent = () => import('../views/AlbumContent')
const Tags = () => import('../views/Tags')
+const TagContent = () => import('../views/TagContent')
+const CategoryContent = () => import('../views/CategoryContent')
const Timeline = () => import('../views/Timeline')
const Faces = () => import('../views/Faces')
const FaceContent = () => import('../views/FaceContent')
@@ -129,18 +131,35 @@ const router = new Router({
}),
},
{
- path: '/tags/:path*',
+ path: '/tags/',
component: Tags,
name: 'tags',
redirect: !areTagsInstalled ? { name: 'timeline' } : null,
props: route => ({
- path: `${route.params.path ? route.params.path : ''}`,
- // if path is empty
+ path: '',
isRoot: !route.params.path,
rootTitle: t('photos', 'Tagged photos'),
}),
},
{
+ path: '/tags/:path',
+ component: TagContent,
+ name: 'tagcontent',
+ redirect: !areTagsInstalled ? { name: 'timeline' } : null,
+ props: route => ({
+ path: `${route.params.path ? route.params.path : ''}`,
+ }),
+ },
+ {
+ path: '/categories/:category',
+ component: CategoryContent,
+ name: 'categorycontent',
+ redirect: !areTagsInstalled ? { name: 'timeline' } : null,
+ props: route => ({
+ category: route.params.category,
+ }),
+ },
+ {
path: '/maps',
name: 'maps',
// router-link doesn't support external url, let's force the redirect