mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 16:32:36 +01:00
New: Add Year sorting to Discover page
This commit is contained in:
parent
b51d1beaaa
commit
c78666009d
7 changed files with 29 additions and 2 deletions
|
|
@ -47,6 +47,15 @@ function DiscoverMovieSortMenu(props) {
|
||||||
{translate('Studio')}
|
{translate('Studio')}
|
||||||
</SortMenuItem>
|
</SortMenuItem>
|
||||||
|
|
||||||
|
<SortMenuItem
|
||||||
|
name="year"
|
||||||
|
sortKey={sortKey}
|
||||||
|
sortDirection={sortDirection}
|
||||||
|
onPress={onSortSelect}
|
||||||
|
>
|
||||||
|
{translate('Year')}
|
||||||
|
</SortMenuItem>
|
||||||
|
|
||||||
<SortMenuItem
|
<SortMenuItem
|
||||||
name="inCinemas"
|
name="inCinemas"
|
||||||
sortKey={sortKey}
|
sortKey={sortKey}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@
|
||||||
.imdbRating,
|
.imdbRating,
|
||||||
.rottenTomatoesRating,
|
.rottenTomatoesRating,
|
||||||
.traktRating,
|
.traktRating,
|
||||||
.runtime {
|
.runtime,
|
||||||
|
.year {
|
||||||
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
|
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
|
||||||
|
|
||||||
flex: 0 0 90px;
|
flex: 0 0 90px;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ interface CssExports {
|
||||||
'studio': string;
|
'studio': string;
|
||||||
'tmdbRating': string;
|
'tmdbRating': string;
|
||||||
'traktRating': string;
|
'traktRating': string;
|
||||||
|
'year': string;
|
||||||
}
|
}
|
||||||
export const cssExports: CssExports;
|
export const cssExports: CssExports;
|
||||||
export default cssExports;
|
export default cssExports;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,8 @@
|
||||||
.imdbRating,
|
.imdbRating,
|
||||||
.rottenTomatoesRating,
|
.rottenTomatoesRating,
|
||||||
.traktRating,
|
.traktRating,
|
||||||
.runtime {
|
.runtime,
|
||||||
|
.year {
|
||||||
composes: cell;
|
composes: cell;
|
||||||
|
|
||||||
flex: 0 0 90px;
|
flex: 0 0 90px;
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ interface CssExports {
|
||||||
'studio': string;
|
'studio': string;
|
||||||
'tmdbRating': string;
|
'tmdbRating': string;
|
||||||
'traktRating': string;
|
'traktRating': string;
|
||||||
|
'year': string;
|
||||||
}
|
}
|
||||||
export const cssExports: CssExports;
|
export const cssExports: CssExports;
|
||||||
export default 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') {
|
if (name === 'collection') {
|
||||||
return (
|
return (
|
||||||
<VirtualTableRowCell
|
<VirtualTableRowCell
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,12 @@ export const defaultState = {
|
||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'year',
|
||||||
|
label: () => translate('Year'),
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'inCinemas',
|
name: 'inCinemas',
|
||||||
label: () => translate('InCinemas'),
|
label: () => translate('InCinemas'),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue