|
|
@ -1,15 +1,20 @@
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import React from 'react';
|
|
|
|
import React from 'react';
|
|
|
|
import BookQuality from 'Book/BookQuality';
|
|
|
|
import BookQuality from 'Book/BookQuality';
|
|
|
|
|
|
|
|
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
|
|
|
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
|
|
|
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
|
|
|
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
|
|
|
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
|
|
|
import TableRow from 'Components/Table/TableRow';
|
|
|
|
import TableRow from 'Components/Table/TableRow';
|
|
|
|
|
|
|
|
import formatBytes from 'Utilities/Number/formatBytes';
|
|
|
|
import BookFileActionsCell from './BookFileActionsCell';
|
|
|
|
import BookFileActionsCell from './BookFileActionsCell';
|
|
|
|
|
|
|
|
import styles from './BookFileEditorRow.css';
|
|
|
|
|
|
|
|
|
|
|
|
function BookFileEditorRow(props) {
|
|
|
|
function BookFileEditorRow(props) {
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
id,
|
|
|
|
id,
|
|
|
|
path,
|
|
|
|
path,
|
|
|
|
|
|
|
|
size,
|
|
|
|
|
|
|
|
dateAdded,
|
|
|
|
quality,
|
|
|
|
quality,
|
|
|
|
qualityCutoffNotMet,
|
|
|
|
qualityCutoffNotMet,
|
|
|
|
isSelected,
|
|
|
|
isSelected,
|
|
|
@ -24,11 +29,26 @@ function BookFileEditorRow(props) {
|
|
|
|
isSelected={isSelected}
|
|
|
|
isSelected={isSelected}
|
|
|
|
onSelectedChange={onSelectedChange}
|
|
|
|
onSelectedChange={onSelectedChange}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<TableRowCell>
|
|
|
|
<TableRowCell
|
|
|
|
|
|
|
|
className={styles.path}
|
|
|
|
|
|
|
|
>
|
|
|
|
{path}
|
|
|
|
{path}
|
|
|
|
</TableRowCell>
|
|
|
|
</TableRowCell>
|
|
|
|
|
|
|
|
|
|
|
|
<TableRowCell>
|
|
|
|
<TableRowCell
|
|
|
|
|
|
|
|
className={styles.size}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{formatBytes(size)}
|
|
|
|
|
|
|
|
</TableRowCell>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<RelativeDateCellConnector
|
|
|
|
|
|
|
|
className={styles.dateAdded}
|
|
|
|
|
|
|
|
date={dateAdded}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<TableRowCell
|
|
|
|
|
|
|
|
className={styles.quality}
|
|
|
|
|
|
|
|
>
|
|
|
|
<BookQuality
|
|
|
|
<BookQuality
|
|
|
|
quality={quality}
|
|
|
|
quality={quality}
|
|
|
|
isCutoffNotMet={qualityCutoffNotMet}
|
|
|
|
isCutoffNotMet={qualityCutoffNotMet}
|
|
|
@ -47,8 +67,10 @@ function BookFileEditorRow(props) {
|
|
|
|
BookFileEditorRow.propTypes = {
|
|
|
|
BookFileEditorRow.propTypes = {
|
|
|
|
id: PropTypes.number.isRequired,
|
|
|
|
id: PropTypes.number.isRequired,
|
|
|
|
path: PropTypes.string.isRequired,
|
|
|
|
path: PropTypes.string.isRequired,
|
|
|
|
|
|
|
|
size: PropTypes.number.isRequired,
|
|
|
|
quality: PropTypes.object.isRequired,
|
|
|
|
quality: PropTypes.object.isRequired,
|
|
|
|
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
|
|
|
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
|
|
|
|
|
|
|
dateAdded: PropTypes.string.isRequired,
|
|
|
|
isSelected: PropTypes.bool,
|
|
|
|
isSelected: PropTypes.bool,
|
|
|
|
onSelectedChange: PropTypes.func.isRequired,
|
|
|
|
onSelectedChange: PropTypes.func.isRequired,
|
|
|
|
deleteBookFile: PropTypes.func.isRequired
|
|
|
|
deleteBookFile: PropTypes.func.isRequired
|
|
|
|