mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-30 00:41:24 +00:00
set default search results to 50
This commit is contained in:
parent
78ab2a795b
commit
42413cffff
3 changed files with 4 additions and 5 deletions
|
@ -6,7 +6,6 @@ const select = (state, props) => ({
|
||||||
uris: makeSelectSearchUris(props.query)(state),
|
uris: makeSelectSearchUris(props.query)(state),
|
||||||
downloadUris: selectSearchDownloadUris(props.query)(state),
|
downloadUris: selectSearchDownloadUris(props.query)(state),
|
||||||
isSearching: selectIsSearching(state),
|
isSearching: selectIsSearching(state),
|
||||||
resultCount: makeSelectClientSetting(settings.RESULT_COUNT)(state),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = () => ({});
|
const perform = () => ({});
|
||||||
|
|
|
@ -26,7 +26,7 @@ class SearchPage extends React.PureComponent<Props> {
|
||||||
}
|
}
|
||||||
|
|
||||||
onSearchResultCountChange(event: SyntheticInputEvent<*>) {
|
onSearchResultCountChange(event: SyntheticInputEvent<*>) {
|
||||||
const count = event.target.value;
|
const count = Number(event.target.value);
|
||||||
this.props.setClientSetting(settings.RESULT_COUNT, count);
|
this.props.setClientSetting(settings.RESULT_COUNT, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class SearchPage extends React.PureComponent<Props> {
|
||||||
<FormField
|
<FormField
|
||||||
type="number"
|
type="number"
|
||||||
name="result_count"
|
name="result_count"
|
||||||
min={1}
|
min={10}
|
||||||
max={1000}
|
max={1000}
|
||||||
value={resultCount}
|
value={resultCount}
|
||||||
onChange={this.onSearchResultCountChange}
|
onChange={this.onSearchResultCountChange}
|
||||||
|
@ -54,7 +54,7 @@ class SearchPage extends React.PureComponent<Props> {
|
||||||
name="show_unavailable"
|
name="show_unavailable"
|
||||||
onChange={this.onShowUnavailableChange}
|
onChange={this.onShowUnavailableChange}
|
||||||
checked={showUnavailable}
|
checked={showUnavailable}
|
||||||
postfix={__('Show unavailable content')}
|
postfix={__('Include unavailable content')}
|
||||||
/>
|
/>
|
||||||
</FormRow>
|
</FormRow>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
|
@ -25,7 +25,7 @@ const defaultState = {
|
||||||
themes: getLocalStorageSetting(SETTINGS.THEMES, []),
|
themes: getLocalStorageSetting(SETTINGS.THEMES, []),
|
||||||
automaticDarkModeEnabled: getLocalStorageSetting(SETTINGS.AUTOMATIC_DARK_MODE_ENABLED, false),
|
automaticDarkModeEnabled: getLocalStorageSetting(SETTINGS.AUTOMATIC_DARK_MODE_ENABLED, false),
|
||||||
autoplay: getLocalStorageSetting(SETTINGS.AUTOPLAY, false),
|
autoplay: getLocalStorageSetting(SETTINGS.AUTOPLAY, false),
|
||||||
resultCount: Number(getLocalStorageSetting(SETTINGS.RESULT_COUNT, 10)),
|
resultCount: Number(getLocalStorageSetting(SETTINGS.RESULT_COUNT, 50)),
|
||||||
},
|
},
|
||||||
isNight: false,
|
isNight: false,
|
||||||
languages: {},
|
languages: {},
|
||||||
|
|
Loading…
Add table
Reference in a new issue