New: Sort by series year in series list

Closes #3245
pull/3268/head
Mark McDowall 5 years ago
parent 07d553fae3
commit 8fd4a98fbe

@ -66,6 +66,12 @@
flex: 0 0 130px; flex: 0 0 130px;
} }
.year {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 80px;
}
.path { .path {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';

@ -105,6 +105,12 @@
flex: 0 0 130px; flex: 0 0 130px;
} }
.year {
composes: cell;
flex: 0 0 80px;
}
.path { .path {
composes: cell; composes: cell;

@ -94,6 +94,7 @@ class SeriesIndexRow extends Component {
added, added,
statistics, statistics,
latestSeason, latestSeason,
year,
path, path,
genres, genres,
ratings, ratings,
@ -342,6 +343,17 @@ class SeriesIndexRow extends Component {
); );
} }
if (name === 'year') {
return (
<VirtualTableRowCell
key={name}
className={styles[name]}
>
{year}
</VirtualTableRowCell>
);
}
if (name === 'path') { if (name === 'path') {
return ( return (
<VirtualTableRowCell <VirtualTableRowCell
@ -503,6 +515,7 @@ SeriesIndexRow.propTypes = {
added: PropTypes.string, added: PropTypes.string,
statistics: PropTypes.object.isRequired, statistics: PropTypes.object.isRequired,
latestSeason: PropTypes.object, latestSeason: PropTypes.object,
year: PropTypes.number,
path: PropTypes.string.isRequired, path: PropTypes.string.isRequired,
genres: PropTypes.arrayOf(PropTypes.string).isRequired, genres: PropTypes.arrayOf(PropTypes.string).isRequired,
ratings: PropTypes.object.isRequired, ratings: PropTypes.object.isRequired,

@ -132,6 +132,12 @@ export const defaultState = {
isSortable: true, isSortable: true,
isVisible: false isVisible: false
}, },
{
name: 'year',
label: 'Year',
isSortable: true,
isVisible: false
},
{ {
name: 'path', name: 'path',
label: 'Path', label: 'Path',

Loading…
Cancel
Save