Fix file links

This commit is contained in:
Leo Vasanko 2023-11-02 17:58:36 +00:00
parent 56082cba15
commit a4f95d730b

View File

@ -61,8 +61,11 @@ import createWebSocket from '@/repositories/WS';
return path === '/' ? '' : path return path === '/' ? '' : path
}) })
const filesBasePath = computed(() => `/files${linkBasePath.value}`) const filesBasePath = computed(() => `/files${linkBasePath.value}`)
const url_for = (doc: FolderDocument) => doc.type === "folder" ? `#${linkBasePath.value}/${doc.name}` : `${filesBasePath}/${doc.name}` const url_for = (doc: FolderDocument) => (
doc.type === "folder" ?
`#${linkBasePath.value}/${doc.name}` :
`${filesBasePath.value}/${doc.name}`
)
// File rename // File rename
const editing = ref<FolderDocument | null>(null) const editing = ref<FolderDocument | null>(null)
const rename = (doc: FolderDocument, newName: string) => { const rename = (doc: FolderDocument, newName: string) => {