3.0.0 #220

Merged
flfeders merged 676 commits from dev into main 2026-09-20 16:10:48 +00:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit 49cbc9314e - Show all commits

View File

@@ -152,7 +152,7 @@ setup()
<div class="flex flex-row">
<div class="w-1/3">
<PDFViewer
v-if="props.documentData.id && props.documentData.path.toLowerCase().includes('pdf')"
v-if="props.documentData.id && String(props.documentData.path || '').toLowerCase().includes('pdf')"
:file-id="props.documentData.id" />
<img

View File

@@ -235,6 +235,11 @@ const breadcrumbItems = computed(() => {
})
// --- Data Mapping ---
const getFileName = (file) => {
const path = String(file?.path || '').trim()
return path ? path.split('/').pop() : `Datei ${file?.id || ''}`.trim()
}
const renderedFileList = computed(() => {
const folderList = folders.value
.filter(i => currentFolder.value ? i.parent === currentFolder.value.id : !i.parent)
@@ -243,7 +248,7 @@ const renderedFileList = computed(() => {
const fileList = documents.value
.filter(i => currentFolder.value ? i.folder === currentFolder.value.id : !i.folder)
.map(i => ({...i, label: i.path.split("/").pop(), type: "file"}))
.map(i => ({...i, label: getFileName(i), type: "file"}))
.sort((a, b) => a.label.localeCompare(b.label))
let combined = [...folderList, ...fileList]
@@ -315,7 +320,7 @@ const updateName = async () => {
await useEntities("folders").update(renameData.value.id, {name: renameData.value.name})
} else {
const file = documents.value.find(d => d.id === renameData.value.id)
const pathParts = file.path.split('/')
const pathParts = String(file?.path || '').split('/')
pathParts[pathParts.length - 1] = renameData.value.name
await useEntities("files").update(renameData.value.id, {path: pathParts.join('/')})
}