New: Date added for files in movie details

pull/9699/head
Bogdan 4 months ago
parent 5b7c0a94fb
commit 20d9db2cde

@ -45,7 +45,8 @@
width: 165px; width: 165px;
} }
.releaseGroup { .releaseGroup,
.dateAdded {
composes: cell from '~Components/Table/Cells/TableRowCell.css'; composes: cell from '~Components/Table/Cells/TableRowCell.css';
width: 120px; width: 120px;

@ -6,6 +6,7 @@ interface CssExports {
'audio': string; 'audio': string;
'audioLanguages': string; 'audioLanguages': string;
'customFormatScore': string; 'customFormatScore': string;
'dateAdded': string;
'download': string; 'download': string;
'formats': string; 'formats': string;
'language': string; 'language': string;

@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import IconButton from 'Components/Link/IconButton'; import IconButton from 'Components/Link/IconButton';
import ConfirmModal from 'Components/Modal/ConfirmModal'; import ConfirmModal from 'Components/Modal/ConfirmModal';
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableRow from 'Components/Table/TableRow'; import TableRow from 'Components/Table/TableRow';
import Tooltip from 'Components/Tooltip/Tooltip'; import Tooltip from 'Components/Tooltip/Tooltip';
@ -82,6 +83,7 @@ class MovieFileEditorRow extends Component {
customFormats, customFormats,
customFormatScore, customFormatScore,
languages, languages,
dateAdded,
columns columns
} = this.props; } = this.props;
@ -287,6 +289,16 @@ class MovieFileEditorRow extends Component {
); );
} }
if (name === 'dateAdded') {
return (
<RelativeDateCellConnector
key={name}
className={styles.dateAdded}
date={dateAdded}
/>
);
}
if (name === 'actions') { if (name === 'actions') {
return ( return (
<TableRowCell key={name} className={styles.actions}> <TableRowCell key={name} className={styles.actions}>
@ -354,6 +366,7 @@ MovieFileEditorRow.propTypes = {
qualityCutoffNotMet: PropTypes.bool.isRequired, qualityCutoffNotMet: PropTypes.bool.isRequired,
languages: PropTypes.arrayOf(PropTypes.object).isRequired, languages: PropTypes.arrayOf(PropTypes.object).isRequired,
mediaInfo: PropTypes.object, mediaInfo: PropTypes.object,
dateAdded: PropTypes.string,
columns: PropTypes.arrayOf(PropTypes.object).isRequired, columns: PropTypes.arrayOf(PropTypes.object).isRequired,
onDeletePress: PropTypes.func.isRequired onDeletePress: PropTypes.func.isRequired
}; };

@ -98,6 +98,11 @@ export const defaultState = {
}), }),
isVisible: true isVisible: true
}, },
{
name: 'dateAdded',
label: () => translate('Added'),
isVisible: false
},
{ {
name: 'actions', name: 'actions',
columnLabel: () => translate('Actions'), columnLabel: () => translate('Actions'),

Loading…
Cancel
Save