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.
90 lines
2.3 KiB
90 lines
2.3 KiB
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 IndexerIndexSortMenuProps {
|
|
sortKey?: string;
|
|
sortDirection?: SortDirection;
|
|
isDisabled: boolean;
|
|
onSortSelect(sortKey: string): unknown;
|
|
}
|
|
|
|
function IndexerIndexSortMenu(props: IndexerIndexSortMenuProps) {
|
|
const { sortKey, sortDirection, isDisabled, onSortSelect } = props;
|
|
|
|
return (
|
|
<SortMenu isDisabled={isDisabled} alignMenu={align.RIGHT}>
|
|
<MenuContent>
|
|
<SortMenuItem
|
|
name="status"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Status')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="sortName"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Name')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="added"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Added')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="appProfileId"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('SyncProfile')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="priority"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Priority')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="protocol"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Protocol')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="privacy"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Privacy')}
|
|
</SortMenuItem>
|
|
</MenuContent>
|
|
</SortMenu>
|
|
);
|
|
}
|
|
|
|
export default IndexerIndexSortMenu;
|