diff --git a/frontend/src/components/BreadCrumb.vue b/frontend/src/components/BreadCrumb.vue index ce98fda..7016559 100644 --- a/frontend/src/components/BreadCrumb.vue +++ b/frontend/src/components/BreadCrumb.vue @@ -48,9 +48,11 @@ const navigate = (index: number) => { if (!link) throw Error(`No link at index ${index} (path: ${props.path})`) const url = `/${longest.value.slice(0, index).join('/')}/` const here = `/${longest.value.join('/')}/` + const current = decodeURIComponent(location.hash.slice(1).split('//')[0]) + const u = url.replaceAll('?', '%3F').replaceAll('#', '%23') + if (here.startsWith(current)) router.replace(u) + else router.push(u) link.focus() - if (here.startsWith(location.hash.slice(1))) router.replace(url) - else router.push(url) } const move = (dir: number) => { diff --git a/frontend/src/components/FileExplorer.vue b/frontend/src/components/FileExplorer.vue index 155da5f..f873093 100644 --- a/frontend/src/components/FileExplorer.vue +++ b/frontend/src/components/FileExplorer.vue @@ -50,7 +50,7 @@