mirror of https://github.com/Radarr/Radarr
171 lines
4.3 KiB
TypeScript
171 lines
4.3 KiB
TypeScript
import React from 'react';
|
|
import MenuContent from 'Components/Menu/MenuContent';
|
|
import SortMenu from 'Components/Menu/SortMenu';
|
|
import SortMenuItem from 'Components/Menu/SortMenuItem';
|
|
import { align } from 'Helpers/Props';
|
|
import SortDirection from 'Helpers/Props/SortDirection';
|
|
import translate from 'Utilities/String/translate';
|
|
|
|
interface MovieIndexSortMenuProps {
|
|
sortKey?: string;
|
|
sortDirection?: SortDirection;
|
|
isDisabled: boolean;
|
|
onSortSelect(sortKey: string): unknown;
|
|
}
|
|
|
|
function MovieIndexSortMenu(props: MovieIndexSortMenuProps) {
|
|
const { sortKey, sortDirection, isDisabled, onSortSelect } = props;
|
|
|
|
return (
|
|
<SortMenu isDisabled={isDisabled} alignMenu={align.RIGHT}>
|
|
<MenuContent>
|
|
<SortMenuItem
|
|
name="status"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('MonitoredStatus')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="sortTitle"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Title')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="studio"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Studio')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="qualityProfileId"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('QualityProfile')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="added"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Added')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="year"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Year')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="inCinemas"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('InCinemas')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="physicalRelease"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('PhysicalRelease')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="digitalRelease"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('DigitalRelease')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="imdbRating"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('ImdbRating')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="tmdbRating"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('TmdbRating')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="path"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Path')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="sizeOnDisk"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('SizeOnDisk')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="certification"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Certification')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="originalTitle"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('OriginalTitle')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="originalLanguage"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('OriginalLanguage')}
|
|
</SortMenuItem>
|
|
</MenuContent>
|
|
</SortMenu>
|
|
);
|
|
}
|
|
|
|
export default MovieIndexSortMenu;
|