mirror of
https://github.com/Radarr/Radarr
synced 2025-10-06 06:02:50 +02:00
New: Add Year sorting to Discover page
This commit is contained in:
@@ -47,6 +47,15 @@ function DiscoverMovieSortMenu(props) {
|
||||
{translate('Studio')}
|
||||
</SortMenuItem>
|
||||
|
||||
<SortMenuItem
|
||||
name="year"
|
||||
sortKey={sortKey}
|
||||
sortDirection={sortDirection}
|
||||
onPress={onSortSelect}
|
||||
>
|
||||
{translate('Year')}
|
||||
</SortMenuItem>
|
||||
|
||||
<SortMenuItem
|
||||
name="inCinemas"
|
||||
sortKey={sortKey}
|
||||
|
@@ -36,7 +36,8 @@
|
||||
.imdbRating,
|
||||
.rottenTomatoesRating,
|
||||
.traktRating,
|
||||
.runtime {
|
||||
.runtime,
|
||||
.year {
|
||||
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
|
||||
|
||||
flex: 0 0 90px;
|
||||
|
@@ -22,6 +22,7 @@ interface CssExports {
|
||||
'studio': string;
|
||||
'tmdbRating': string;
|
||||
'traktRating': string;
|
||||
'year': string;
|
||||
}
|
||||
export const cssExports: CssExports;
|
||||
export default cssExports;
|
||||
|
@@ -61,7 +61,8 @@
|
||||
.imdbRating,
|
||||
.rottenTomatoesRating,
|
||||
.traktRating,
|
||||
.runtime {
|
||||
.runtime,
|
||||
.year {
|
||||
composes: cell;
|
||||
|
||||
flex: 0 0 90px;
|
||||
|
@@ -28,6 +28,7 @@ interface CssExports {
|
||||
'studio': string;
|
||||
'tmdbRating': string;
|
||||
'traktRating': string;
|
||||
'year': string;
|
||||
}
|
||||
export const cssExports: CssExports;
|
||||
export default cssExports;
|
||||
|
@@ -167,6 +167,14 @@ class DiscoverMovieRow extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'year') {
|
||||
return (
|
||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||
{year}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'collection') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
|
@@ -133,6 +133,12 @@ export const defaultState = {
|
||||
isSortable: true,
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'year',
|
||||
label: () => translate('Year'),
|
||||
isSortable: true,
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'inCinemas',
|
||||
label: () => translate('InCinemas'),
|
||||
|
Reference in New Issue
Block a user