Dateien nach "frontend/src/tools" hochladen
This commit is contained in:
@@ -241,6 +241,16 @@ export default function Dateien({ toast, mobile }) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Neuer Ordner Button (in Unterordnern) */}
|
||||||
|
{tab==='own' && currentFolderId && !newFolder && (
|
||||||
|
<button onClick={()=>setNewFolder(true)} style={{
|
||||||
|
display:'flex', alignItems:'center', gap:8, marginBottom:8,
|
||||||
|
background:'rgba(255,255,255,0.03)', border:'1px dashed rgba(255,255,255,0.15)',
|
||||||
|
borderRadius:8, padding:'8px 14px', cursor:'pointer',
|
||||||
|
color:'rgba(255,255,255,0.55)', fontFamily:'monospace', fontSize:11, width:'100%',
|
||||||
|
}}>📁 + Neuen Unterordner erstellen</button>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Neuer Ordner Formular */}
|
{/* Neuer Ordner Formular */}
|
||||||
{newFolder && (
|
{newFolder && (
|
||||||
<div style={{...S.card,marginBottom:10,display:'flex',gap:8,alignItems:'center'}}>
|
<div style={{...S.card,marginBottom:10,display:'flex',gap:8,alignItems:'center'}}>
|
||||||
@@ -295,20 +305,21 @@ export default function Dateien({ toast, mobile }) {
|
|||||||
<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}` : null,
|
folder.owner && tab!=='sharedByMe' ? `von ${folder.owner}` : null,
|
||||||
folder.subCount>0 ? `${folder.subCount} Ordner` : null,
|
folder.subCount>0 ? `${folder.subCount} Ordner` : null,
|
||||||
folder.fileCount>0 ? `${folder.fileCount} Datei${folder.fileCount!==1?'en':''}` : null,
|
folder.fileCount>0 ? `${folder.fileCount} Datei${folder.fileCount!==1?'en':''}` : null,
|
||||||
folder.fileCount>0 && folder.totalSize>0 ? fmtSize(folder.totalSize) : null,
|
folder.fileCount>0 && folder.totalSize>0 ? fmtSize(folder.totalSize) : null,
|
||||||
(folder.subCount===0 && folder.fileCount===0) ? 'leer' : null,
|
(folder.subCount===0 && folder.fileCount===0) ? 'leer' : null,
|
||||||
|
tab==='sharedByMe'&&folder.shared_with_names ? `geteilt mit: ${folder.shared_with_names}` : null,
|
||||||
].filter(Boolean).join(' · ')}
|
].filter(Boolean).join(' · ')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!folder.owner && (
|
{(!folder.owner || tab==='sharedByMe') && (
|
||||||
<div style={{display:'flex',gap:5}} onClick={e=>e.stopPropagation()}>
|
<div style={{display:'flex',gap:5}} onClick={e=>e.stopPropagation()}>
|
||||||
<button onClick={()=>setShareItem({item:folder,type:'folder'})} style={S.btn('#ffe66d',true)} title="Teilen">🤝</button>
|
<button onClick={()=>setShareItem({item:folder,type:'folder'})} style={S.btn('#ffe66d',true)} title="Teilen verwalten">🤝</button>
|
||||||
<button onClick={()=>delFolder(folder)} style={S.btn('#ff6b9d',true)} title="Löschen">
|
{tab==='own'&&<button onClick={()=>delFolder(folder)} style={S.btn('#ff6b9d',true)} title="Löschen">
|
||||||
<TrashIcon size={13} color="#ff6b9d"/>
|
<TrashIcon size={13} color="#ff6b9d"/>
|
||||||
</button>
|
</button>}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<ChevronIcon size={14} color="rgba(255,255,255,0.3)" dir="right"/>
|
<ChevronIcon size={14} color="rgba(255,255,255,0.3)" dir="right"/>
|
||||||
@@ -325,19 +336,20 @@ export default function Dateien({ toast, mobile }) {
|
|||||||
overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap'}}>{file.originalname}</div>
|
overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap'}}>{file.originalname}</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}}>
|
||||||
{fmtSize(file.size)} · {fmtDate(file.created_at)}
|
{fmtSize(file.size)} · {fmtDate(file.created_at)}
|
||||||
{file.owner&&file.owner!==undefined&&tab==='shared'?` · von ${file.owner}`:''}
|
{tab==='shared'?` · von ${file.owner}`:''}
|
||||||
|
{tab==='sharedByMe'&&file.shared_with_names?` · mit: ${file.shared_with_names}${file.shared_at?' seit '+fmtDate(file.shared_at):''}` : ''}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{display:'flex',gap:5,flexShrink:0}}>
|
<div style={{display:'flex',gap:5,flexShrink:0}}>
|
||||||
<button onClick={()=>download(file)} style={S.btn('#4ecdc4',true)} title="Download">
|
<button onClick={()=>download(file)} style={S.btn('#4ecdc4',true)} title="Download">
|
||||||
<DownloadIcon size={13} color="#4ecdc4"/>
|
<DownloadIcon size={13} color="#4ecdc4"/>
|
||||||
</button>
|
</button>
|
||||||
{tab==='own'&&!inSharedFolder&&<>
|
{(tab==='own'&&!inSharedFolder)||tab==='sharedByMe' ? <>
|
||||||
<button onClick={()=>setShareItem({item:file,type:'file'})} style={S.btn('#ffe66d',true)} title="Teilen">🤝</button>
|
<button onClick={()=>setShareItem({item:file,type:'file'})} style={S.btn('#ffe66d',true)} title="Teilen verwalten">🤝</button>
|
||||||
<button onClick={()=>delFile(file)} style={S.btn('#ff6b9d',true)} title="Löschen">
|
{tab==='own'&&<button onClick={()=>delFile(file)} style={S.btn('#ff6b9d',true)} title="Löschen">
|
||||||
<TrashIcon size={13} color="#ff6b9d"/>
|
<TrashIcon size={13} color="#ff6b9d"/>
|
||||||
</button>
|
</button>}
|
||||||
</>}
|
</> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user