Use canonical paths for editor and fix route transitions

This commit is contained in:
2026-05-07 02:18:55 +00:00
parent 6d7f44bd88
commit bf8a049b92
6 changed files with 61 additions and 32 deletions
+4 -1
View File
@@ -34,7 +34,10 @@ const store = useMainStore()
const MAX_SIZE = 1024 * 1024 // 1 MiB
const filePath = computed(() => decodeURIComponent(route.path.slice(6))) // strip /edit/
const filePath = computed(() => {
const raw = decodeURIComponent(route.path).split('//')[0] ?? ''
return raw.replace(/^\//, '').replace(/\/$/, '')
})
const filename = computed(() => filePath.value.split('/').pop() || '')
const filesUrl = computed(() => {