mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
New: Load all books on page load and store in the browser
This commit is contained in:
@@ -5,6 +5,7 @@ import { withRouter } from 'react-router-dom';
|
||||
import { createSelector } from 'reselect';
|
||||
import { saveDimensions, setIsSidebarVisible } from 'Store/Actions/appActions';
|
||||
import { fetchAuthor } from 'Store/Actions/authorActions';
|
||||
import { fetchBooks } from 'Store/Actions/bookActions';
|
||||
import { fetchCustomFilters } from 'Store/Actions/customFilterActions';
|
||||
import { fetchImportLists, fetchLanguages, fetchMetadataProfiles, fetchQualityProfiles, fetchUISettings } from 'Store/Actions/settingsActions';
|
||||
import { fetchStatus } from 'Store/Actions/systemActions';
|
||||
@@ -148,6 +149,9 @@ function createMapDispatchToProps(dispatch, props) {
|
||||
dispatchFetchAuthor() {
|
||||
dispatch(fetchAuthor());
|
||||
},
|
||||
dispatchFetchBooks() {
|
||||
dispatch(fetchBooks());
|
||||
},
|
||||
dispatchFetchCustomFilters() {
|
||||
dispatch(fetchCustomFilters());
|
||||
},
|
||||
@@ -197,6 +201,7 @@ class PageConnector extends Component {
|
||||
componentDidMount() {
|
||||
if (!this.props.isPopulated) {
|
||||
this.props.dispatchFetchAuthor();
|
||||
this.props.dispatchFetchBooks();
|
||||
this.props.dispatchFetchCustomFilters();
|
||||
this.props.dispatchFetchTags();
|
||||
this.props.dispatchFetchLanguages();
|
||||
@@ -223,6 +228,7 @@ class PageConnector extends Component {
|
||||
isPopulated,
|
||||
hasError,
|
||||
dispatchFetchAuthor,
|
||||
dispatchFetchBooks,
|
||||
dispatchFetchTags,
|
||||
dispatchFetchLanguages,
|
||||
dispatchFetchQualityProfiles,
|
||||
@@ -262,6 +268,7 @@ PageConnector.propTypes = {
|
||||
hasError: PropTypes.bool.isRequired,
|
||||
isSidebarVisible: PropTypes.bool.isRequired,
|
||||
dispatchFetchAuthor: PropTypes.func.isRequired,
|
||||
dispatchFetchBooks: PropTypes.func.isRequired,
|
||||
dispatchFetchCustomFilters: PropTypes.func.isRequired,
|
||||
dispatchFetchTags: PropTypes.func.isRequired,
|
||||
dispatchFetchLanguages: PropTypes.func.isRequired,
|
||||
|
||||
@@ -42,7 +42,7 @@ const links = [
|
||||
},
|
||||
{
|
||||
title: 'Bookshelf',
|
||||
to: '/bookshelf'
|
||||
to: '/shelf'
|
||||
},
|
||||
{
|
||||
title: 'Unmapped Files',
|
||||
|
||||
Reference in New Issue
Block a user