|
|
@ -24,6 +24,7 @@ class SearchFooter extends Component {
|
|
|
|
super(props, context);
|
|
|
|
super(props, context);
|
|
|
|
|
|
|
|
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
|
|
|
|
defaultSearchQueryParams,
|
|
|
|
defaultIndexerIds,
|
|
|
|
defaultIndexerIds,
|
|
|
|
defaultCategories,
|
|
|
|
defaultCategories,
|
|
|
|
defaultSearchQuery,
|
|
|
|
defaultSearchQuery,
|
|
|
@ -33,16 +34,16 @@ class SearchFooter extends Component {
|
|
|
|
} = props;
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
this.state = {
|
|
|
|
isQueryParameterModalOpen: false,
|
|
|
|
searchIndexerIds: defaultSearchQueryParams.searchIndexerIds ?? defaultIndexerIds,
|
|
|
|
queryModalOptions: null,
|
|
|
|
searchCategories: defaultSearchQueryParams.searchCategories ?? defaultCategories,
|
|
|
|
searchType: defaultSearchType,
|
|
|
|
searchQuery: (defaultSearchQueryParams.searchQuery ?? defaultSearchQuery) || '',
|
|
|
|
|
|
|
|
searchType: defaultSearchQueryParams.searchType ?? defaultSearchType,
|
|
|
|
|
|
|
|
searchLimit: defaultSearchQueryParams.searchLimit ?? defaultSearchLimit,
|
|
|
|
|
|
|
|
searchOffset: defaultSearchQueryParams.searchOffset ?? defaultSearchOffset,
|
|
|
|
|
|
|
|
newSearch: true,
|
|
|
|
searchingReleases: false,
|
|
|
|
searchingReleases: false,
|
|
|
|
searchQuery: defaultSearchQuery || '',
|
|
|
|
isQueryParameterModalOpen: false,
|
|
|
|
searchIndexerIds: defaultIndexerIds,
|
|
|
|
queryModalOptions: null
|
|
|
|
searchCategories: defaultCategories,
|
|
|
|
|
|
|
|
searchLimit: defaultSearchLimit,
|
|
|
|
|
|
|
|
searchOffset: defaultSearchOffset,
|
|
|
|
|
|
|
|
newSearch: true
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -189,6 +190,7 @@ class SearchFooter extends Component {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
icon = icons.SEARCH;
|
|
|
|
icon = icons.SEARCH;
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let footerLabel = searchIndexerIds.length === 0 ? translate('SearchAllIndexers') : translate('SearchCountIndexers', { count: searchIndexerIds.length });
|
|
|
|
let footerLabel = searchIndexerIds.length === 0 ? translate('SearchAllIndexers') : translate('SearchCountIndexers', { count: searchIndexerIds.length });
|
|
|
@ -300,6 +302,7 @@ class SearchFooter extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SearchFooter.propTypes = {
|
|
|
|
SearchFooter.propTypes = {
|
|
|
|
|
|
|
|
defaultSearchQueryParams: PropTypes.object.isRequired,
|
|
|
|
defaultIndexerIds: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
|
|
defaultIndexerIds: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
|
|
defaultCategories: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
|
|
defaultCategories: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
|
|
defaultSearchQuery: PropTypes.string.isRequired,
|
|
|
|
defaultSearchQuery: PropTypes.string.isRequired,
|
|
|
|