Dateien nach "frontend/src/tools" hochladen
This commit is contained in:
@@ -166,8 +166,10 @@ export default function Dateien({ toast, mobile }) {
|
|||||||
const sq = search.toLowerCase();
|
const sq = search.toLowerCase();
|
||||||
const currentFolders = tab==='own' ? folders.own : folders.shared;
|
const currentFolders = tab==='own' ? folders.own : folders.shared;
|
||||||
const currentFiles = tab==='own' ? data.own : data.shared;
|
const currentFiles = tab==='own' ? data.own : data.shared;
|
||||||
const filtFolders = sq ? currentFolders.filter(f=>f.name.toLowerCase().includes(sq)) : currentFolders;
|
const currentFolders2 = tab==='sharedByMe' ? (folders.sharedByMe||[]) : currentFolders;
|
||||||
const filtFiles = sq ? currentFiles.filter(f=>f.originalname.toLowerCase().includes(sq)) : currentFiles;
|
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 totalSize = data.own.reduce((s,f)=>s+f.size,0);
|
||||||
const inSharedFolder = folderPath.some(p=>p.isShared);
|
const inSharedFolder = folderPath.some(p=>p.isShared);
|
||||||
@@ -279,10 +281,13 @@ export default function Dateien({ toast, mobile }) {
|
|||||||
<div style={{flex:1,minWidth:0}}>
|
<div style={{flex:1,minWidth:0}}>
|
||||||
<div style={{color:'#fff',fontFamily:'monospace',fontSize:13,fontWeight:700}}>{folder.name}</div>
|
<div style={{color:'#fff',fontFamily:'monospace',fontSize:13,fontWeight:700}}>{folder.name}</div>
|
||||||
<div style={{color:'rgba(255,255,255,0.45)',fontFamily:'monospace',fontSize:10,marginTop:2}}>
|
<div style={{color:'rgba(255,255,255,0.45)',fontFamily:'monospace',fontSize:10,marginTop:2}}>
|
||||||
{folder.owner ? `von ${folder.owner} · ` : ''}
|
{[
|
||||||
{folder.subCount>0?`${folder.subCount} Ordner · `:''}
|
folder.owner ? `von ${folder.owner}` : null,
|
||||||
{folder.fileCount>0?`${folder.fileCount} Datei${folder.fileCount!==1?'en':''} · `:''}
|
folder.subCount>0 ? `${folder.subCount} Ordner` : null,
|
||||||
{folder.totalSize>0?fmtSize(folder.totalSize):'leer'}
|
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(' · ')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!folder.owner && (
|
{!folder.owner && (
|
||||||
|
|||||||
Reference in New Issue
Block a user