diff --git a/db.sqlite-shm b/db.sqlite-shm index baae271..aaaba37 100644 Binary files a/db.sqlite-shm and b/db.sqlite-shm differ diff --git a/db.sqlite-wal b/db.sqlite-wal index a33d704..aaec132 100644 Binary files a/db.sqlite-wal and b/db.sqlite-wal differ diff --git a/layouts/default.vue b/layouts/default.vue index 7817145..95bf1d0 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -57,6 +57,7 @@ import { hasPermissions } from '#shared/auth.util'; import { TreeDOM } from '#shared/tree'; import { Content, iconByType } from '#shared/content.util'; import { dom, icon, text } from '#shared/dom.util'; +import { unifySlug } from '#shared/general.util'; import { popper } from '#shared/floating.util'; import { link } from '#shared/proses'; @@ -77,7 +78,7 @@ const { fetch } = useContent(); await fetch(false); const route = useRouter().currentRoute; -const path = computed(() => route.value.params.path ? decodeURIComponent(Array.isArray(route.value.params.path) ? route.value.params.path[0] : route.value.params.path) : undefined); +const path = computed(() => route.value.params.path ? decodeURIComponent(unifySlug(route.value.params.path)) : undefined); await Content.init(); const tree = new TreeDOM((item, depth) => { @@ -100,7 +101,7 @@ const unmount = useRouter().afterEach((to, from, failure) => { if(failure) return; - to.name === 'explore-path' && ((to.params.path as string).split('/').map((e, i, a) => a.slice(0, i).join('/')) ?? []).forEach(e => tree.toggle(e, true)); + to.name === 'explore-path' && (unifySlug(to.params.path).split('/').map((e, i, a) => a.slice(0, i).join('/')) ?? []).forEach(e => tree.toggle(e, true)); }); watch(route, () => { diff --git a/pages/explore/[...path].vue b/pages/explore/[...path].vue index 2b13f29..b847a0e 100644 --- a/pages/explore/[...path].vue +++ b/pages/explore/[...path].vue @@ -7,16 +7,16 @@