mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
0db6cf272f
Fixes #1403
115 lines
2.6 KiB
JavaScript
115 lines
2.6 KiB
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import MenuContent from 'Components/Menu/MenuContent';
|
|
import SortMenu from 'Components/Menu/SortMenu';
|
|
import SortMenuItem from 'Components/Menu/SortMenuItem';
|
|
import { align, sortDirections } from 'Helpers/Props';
|
|
|
|
function BookIndexSortMenu(props) {
|
|
const {
|
|
sortKey,
|
|
sortDirection,
|
|
isDisabled,
|
|
onSortSelect
|
|
} = props;
|
|
|
|
return (
|
|
<SortMenu
|
|
isDisabled={isDisabled}
|
|
alignMenu={align.RIGHT}
|
|
>
|
|
<MenuContent>
|
|
<SortMenuItem
|
|
name="status"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Monitored/Status
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="title"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Title
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="authorTitle"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Author, Title
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="releaseDate"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Release Date
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="qualityProfileId"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Quality Profile
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="added"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Added
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="bookFileCount"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
Files
|
|
</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>
|
|
);
|
|
}
|
|
|
|
BookIndexSortMenu.propTypes = {
|
|
sortKey: PropTypes.string,
|
|
sortDirection: PropTypes.oneOf(sortDirections.all),
|
|
isDisabled: PropTypes.bool.isRequired,
|
|
onSortSelect: PropTypes.func.isRequired
|
|
};
|
|
|
|
export default BookIndexSortMenu;
|