diff --git a/frontend/src/tools/dateien.jsx b/frontend/src/tools/dateien.jsx index 484d38c..44b1a38 100644 --- a/frontend/src/tools/dateien.jsx +++ b/frontend/src/tools/dateien.jsx @@ -166,8 +166,10 @@ export default function Dateien({ toast, mobile }) { const sq = search.toLowerCase(); const currentFolders = tab==='own' ? folders.own : folders.shared; const currentFiles = tab==='own' ? data.own : data.shared; - const filtFolders = sq ? currentFolders.filter(f=>f.name.toLowerCase().includes(sq)) : currentFolders; - const filtFiles = sq ? currentFiles.filter(f=>f.originalname.toLowerCase().includes(sq)) : currentFiles; + const currentFolders2 = tab==='sharedByMe' ? (folders.sharedByMe||[]) : currentFolders; + const currentFiles2 = tab==='sharedByMe' ? (data.sharedByMe||[]) : currentFiles; + const filtFolders = sq ? currentFolders2.filter(f=>f.name.toLowerCase().includes(sq)) : currentFolders2; + const filtFiles = sq ? currentFiles2.filter(f=>f.originalname.toLowerCase().includes(sq)) : currentFiles2; const totalSize = data.own.reduce((s,f)=>s+f.size,0); const inSharedFolder = folderPath.some(p=>p.isShared); @@ -279,10 +281,13 @@ export default function Dateien({ toast, mobile }) {
{folder.name}
- {folder.owner ? `von ${folder.owner} · ` : ''} - {folder.subCount>0?`${folder.subCount} Ordner · `:''} - {folder.fileCount>0?`${folder.fileCount} Datei${folder.fileCount!==1?'en':''} · `:''} - {folder.totalSize>0?fmtSize(folder.totalSize):'leer'} + {[ + folder.owner ? `von ${folder.owner}` : null, + folder.subCount>0 ? `${folder.subCount} Ordner` : null, + folder.fileCount>0 ? `${folder.fileCount} Datei${folder.fileCount!==1?'en':''}` : null, + folder.fileCount>0 && folder.totalSize>0 ? fmtSize(folder.totalSize) : null, + (folder.subCount===0 && folder.fileCount===0) ? 'leer' : null, + ].filter(Boolean).join(' · ')}
{!folder.owner && (