You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.4 KiB
63 lines
1.4 KiB
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import padNumber from 'Utilities/Number/padNumber';
|
|
import Label from 'Components/Label';
|
|
import TableRow from 'Components/Table/TableRow';
|
|
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
|
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
|
import TrackQuality from 'Album/TrackQuality';
|
|
|
|
function TrackFileEditorRow(props) {
|
|
const {
|
|
id,
|
|
trackNumber,
|
|
relativePath,
|
|
language,
|
|
quality,
|
|
isSelected,
|
|
onSelectedChange
|
|
} = props;
|
|
|
|
return (
|
|
<TableRow>
|
|
<TableSelectCell
|
|
id={id}
|
|
isSelected={isSelected}
|
|
onSelectedChange={onSelectedChange}
|
|
/>
|
|
|
|
<TableRowCell>
|
|
{padNumber(trackNumber, 2)}
|
|
</TableRowCell>
|
|
|
|
<TableRowCell>
|
|
{relativePath}
|
|
</TableRowCell>
|
|
|
|
<TableRowCell>
|
|
<Label>
|
|
{language.name}
|
|
</Label>
|
|
</TableRowCell>
|
|
|
|
<TableRowCell>
|
|
<TrackQuality
|
|
quality={quality}
|
|
/>
|
|
</TableRowCell>
|
|
</TableRow>
|
|
);
|
|
}
|
|
|
|
TrackFileEditorRow.propTypes = {
|
|
id: PropTypes.number.isRequired,
|
|
trackNumber: PropTypes.string.isRequired,
|
|
relativePath: PropTypes.string.isRequired,
|
|
language: PropTypes.object.isRequired,
|
|
quality: PropTypes.object.isRequired,
|
|
isSelected: PropTypes.bool,
|
|
onSelectedChange: PropTypes.func.isRequired
|
|
};
|
|
|
|
export default TrackFileEditorRow;
|