You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
146 lines
3.3 KiB
146 lines
3.3 KiB
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { align, sortDirections } from 'Helpers/Props';
|
|
import SortMenu from 'Components/Menu/SortMenu';
|
|
import MenuContent from 'Components/Menu/MenuContent';
|
|
import SortMenuItem from 'Components/Menu/SortMenuItem';
|
|
|
|
function ArtistIndexSortMenu(props) {
|
|
const {
|
|
sortKey,
|
|
sortDirection,
|
|
onSortSelect
|
|
} = props;
|
|
|
|
return (
|
|
<SortMenu alignMenu={align.RIGHT}>
|
|
<MenuContent>
|
|
<SortMenuItem
|
|
name="sortName"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Name
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="artistType"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Type
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="qualityProfileId"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Quality Profile
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="languageProfileId"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Language Profile
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="nextAiring"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Next Airing
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="previousAiring"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Previous Airing
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="added"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Added
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="albumCount"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Albums
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="trackProgress"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Tracks
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="trackCount"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Track Count
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="latestAlbum"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Latest Album
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="path"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Path
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="sizeOnDisk"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Size on Disk
|
|
</SortMenuItem>
|
|
</MenuContent>
|
|
</SortMenu>
|
|
);
|
|
}
|
|
|
|
ArtistIndexSortMenu.propTypes = {
|
|
sortKey: PropTypes.string,
|
|
sortDirection: PropTypes.oneOf(sortDirections.all),
|
|
onSortSelect: PropTypes.func.isRequired
|
|
};
|
|
|
|
export default ArtistIndexSortMenu;
|