import { Avatar, Box, Link, Table, TableContainer, Tbody, Td, Text, Th, Thead, Tr, Wrap, WrapItem, } from '@chakra-ui/react'; import { ProcessState, selectFiles } from './fileListingSlice'; import { useAppSelector } from '../../hooks'; export function FileListing() { const files = useAppSelector(selectFiles); return ( {Object.entries(files).map(([id, file]) => ( ))}
封面 元信息 操作
{file.metadata.cover && } {!file.metadata.cover && 暂无封面} {file.metadata.name || file.fileName} {file.state === ProcessState.COMPLETE && ( <> 专辑: {file.metadata.album} 艺术家: {file.metadata.artist} 专辑艺术家: {file.metadata.albumArtist} )} 播放 {/* TODO: Use correct file name */} {file.decrypted && ( 下载 )} 删除
); }