diff --git a/frontend/src/components/common/FileBrowser.tsx b/frontend/src/components/common/FileBrowser.tsx index b4677dc..cddb9d4 100644 --- a/frontend/src/components/common/FileBrowser.tsx +++ b/frontend/src/components/common/FileBrowser.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react' -import { Folder, ChevronRight, ChevronUp, X, Check, Loader2 } from 'lucide-react' +import { Folder, ChevronRight, ChevronUp, X, Check, Loader2, FileAudio } from 'lucide-react' import api from '../../api/client' interface Entry { name: string; path: string; isDir: boolean } @@ -24,7 +24,7 @@ export default function FileBrowser({ initialPath = '/', onSelect, onClose }: Pr const r = await api.get('/api/filebrowser', { params: { path: p } }) setPath(r.data.path) setParent(r.data.parent) - setEntries(r.data.entries.filter((e: Entry) => e.isDir)) + setEntries(r.data.entries) } catch (err: any) { setError(err.response?.data?.detail || 'Fehler beim Laden') } finally { @@ -68,19 +68,29 @@ export default function FileBrowser({ initialPath = '/', onSelect, onClose }: Pr ) : error ? (
{error}
) : entries.length === 0 ? ( -Keine Unterordner
+Ordner ist leer
) : ( - entries.map((e) => ( - - )) + entries.map((e) => + e.isDir ? ( + + ) : ( +