1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-28 14:16:41 +07:00

Audio title editing

This commit is contained in:
Fedor Katurov 2020-03-16 16:52:16 +07:00
parent da47da9d6a
commit fff3770b1e
7 changed files with 304 additions and 242 deletions

View file

@ -12,17 +12,19 @@ const SortableAudioGrid = SortableContainer(
items,
locked,
onDrop,
onTitleChange,
}: {
items: IFile[];
locked: IUploadStatus[];
onDrop: (file_id: IFile['id']) => void;
onTitleChange: (file_id: IFile['id'], title: IFile['metadata']['title']) => void;
}) => (
<div className={styles.grid}>
{items
.filter(file => file && file.id)
.map((file, index) => (
<SortableImageGridItem key={file.id} index={index} collection={0}>
<AudioPlayer file={file} onDrop={onDrop} nonInteractive />
<AudioPlayer file={file} onDrop={onDrop} onTitleChange={onTitleChange} isEditing />
</SortableImageGridItem>
))}