diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 6dfb87f..4f3fb13 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -234,6 +234,7 @@ function App() { onDelete={handleDelete} onUploadArtwork={handleUploadArtwork} onRemoveArtwork={handleRemoveArtwork} + onPlay={handlePlay} /> )} diff --git a/frontend/src/components/DetailPanel.tsx b/frontend/src/components/DetailPanel.tsx index 54fa4bc..2508095 100644 --- a/frontend/src/components/DetailPanel.tsx +++ b/frontend/src/components/DetailPanel.tsx @@ -23,6 +23,7 @@ interface Props { onDelete: (id: string) => void onUploadArtwork: (id: string, file: File) => void onRemoveArtwork: (id: string) => void + onPlay?: (clip: Clip) => void } const modelName = (modelId: string) => { @@ -33,7 +34,7 @@ const modelName = (modelId: string) => { return names[modelId] || modelId } -export default function DetailPanel({ clip, onClose, onRename, onDelete, onUploadArtwork, onRemoveArtwork }: Props) { +export default function DetailPanel({ clip, onClose, onRename, onDelete, onUploadArtwork, onRemoveArtwork, onPlay }: Props) { const artworkInputRef = useRef(null) const [isEditingTitle, setIsEditingTitle] = useState(false) const [editTitle, setEditTitle] = useState(clip.title || '') @@ -146,17 +147,35 @@ export default function DetailPanel({ clip, onClose, onRename, onDelete, onUploa {clip.artwork_filename ? ( - Album art +
onPlay?.(clip)} + > + Album art +
+ + + +
+
) : ( -
+
onPlay?.(clip)} + > 𝄞 No album art +
+ + + +
)}