|
|
@ -27,69 +27,124 @@ function testLocalStorage() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const selectAppProps = createSelector(
|
|
|
|
|
|
|
|
(state) => state.app.isSidebarVisible,
|
|
|
|
|
|
|
|
(state) => state.app.version,
|
|
|
|
|
|
|
|
(state) => state.app.isUpdated,
|
|
|
|
|
|
|
|
(state) => state.app.isDisconnected,
|
|
|
|
|
|
|
|
(isSidebarVisible, version, isUpdated, isDisconnected) => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
isSidebarVisible,
|
|
|
|
|
|
|
|
version,
|
|
|
|
|
|
|
|
isUpdated,
|
|
|
|
|
|
|
|
isDisconnected
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const selectIsPopulated = createSelector(
|
|
|
|
|
|
|
|
(state) => state.artist.isPopulated,
|
|
|
|
|
|
|
|
(state) => state.customFilters.isPopulated,
|
|
|
|
|
|
|
|
(state) => state.tags.isPopulated,
|
|
|
|
|
|
|
|
(state) => state.settings.ui.isPopulated,
|
|
|
|
|
|
|
|
(state) => state.settings.qualityProfiles.isPopulated,
|
|
|
|
|
|
|
|
(state) => state.settings.languageProfiles.isPopulated,
|
|
|
|
|
|
|
|
(state) => state.settings.metadataProfiles.isPopulated,
|
|
|
|
|
|
|
|
(state) => state.settings.importLists.isPopulated,
|
|
|
|
|
|
|
|
(state) => state.system.status.isPopulated,
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
artistIsPopulated,
|
|
|
|
|
|
|
|
customFiltersIsPopulated,
|
|
|
|
|
|
|
|
tagsIsPopulated,
|
|
|
|
|
|
|
|
uiSettingsIsPopulated,
|
|
|
|
|
|
|
|
qualityProfilesIsPopulated,
|
|
|
|
|
|
|
|
languageProfilesIsPopulated,
|
|
|
|
|
|
|
|
metadataProfilesIsPopulated,
|
|
|
|
|
|
|
|
importListsIsPopulated,
|
|
|
|
|
|
|
|
systemStatusIsPopulated
|
|
|
|
|
|
|
|
) => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
artistIsPopulated &&
|
|
|
|
|
|
|
|
customFiltersIsPopulated &&
|
|
|
|
|
|
|
|
tagsIsPopulated &&
|
|
|
|
|
|
|
|
uiSettingsIsPopulated &&
|
|
|
|
|
|
|
|
qualityProfilesIsPopulated &&
|
|
|
|
|
|
|
|
languageProfilesIsPopulated &&
|
|
|
|
|
|
|
|
metadataProfilesIsPopulated &&
|
|
|
|
|
|
|
|
importListsIsPopulated &&
|
|
|
|
|
|
|
|
systemStatusIsPopulated
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const selectErrors = createSelector(
|
|
|
|
|
|
|
|
(state) => state.artist.error,
|
|
|
|
|
|
|
|
(state) => state.customFilters.error,
|
|
|
|
|
|
|
|
(state) => state.tags.error,
|
|
|
|
|
|
|
|
(state) => state.settings.ui.error,
|
|
|
|
|
|
|
|
(state) => state.settings.qualityProfiles.error,
|
|
|
|
|
|
|
|
(state) => state.settings.languageProfiles.error,
|
|
|
|
|
|
|
|
(state) => state.settings.metadataProfiles.error,
|
|
|
|
|
|
|
|
(state) => state.settings.importLists.error,
|
|
|
|
|
|
|
|
(state) => state.system.status.error,
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
artistError,
|
|
|
|
|
|
|
|
customFiltersError,
|
|
|
|
|
|
|
|
tagsError,
|
|
|
|
|
|
|
|
uiSettingsError,
|
|
|
|
|
|
|
|
qualityProfilesError,
|
|
|
|
|
|
|
|
languageProfilesError,
|
|
|
|
|
|
|
|
metadataProfilesError,
|
|
|
|
|
|
|
|
importListsError,
|
|
|
|
|
|
|
|
systemStatusError
|
|
|
|
|
|
|
|
) => {
|
|
|
|
|
|
|
|
const hasError = !!(
|
|
|
|
|
|
|
|
artistError ||
|
|
|
|
|
|
|
|
customFiltersError ||
|
|
|
|
|
|
|
|
tagsError ||
|
|
|
|
|
|
|
|
uiSettingsError ||
|
|
|
|
|
|
|
|
qualityProfilesError ||
|
|
|
|
|
|
|
|
languageProfilesError ||
|
|
|
|
|
|
|
|
metadataProfilesError ||
|
|
|
|
|
|
|
|
importListsError ||
|
|
|
|
|
|
|
|
systemStatusError
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
hasError,
|
|
|
|
|
|
|
|
artistError,
|
|
|
|
|
|
|
|
customFiltersError,
|
|
|
|
|
|
|
|
tagsError,
|
|
|
|
|
|
|
|
uiSettingsError,
|
|
|
|
|
|
|
|
qualityProfilesError,
|
|
|
|
|
|
|
|
languageProfilesError,
|
|
|
|
|
|
|
|
metadataProfilesError,
|
|
|
|
|
|
|
|
importListsError,
|
|
|
|
|
|
|
|
systemStatusError
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
function createMapStateToProps() {
|
|
|
|
function createMapStateToProps() {
|
|
|
|
return createSelector(
|
|
|
|
return createSelector(
|
|
|
|
(state) => state.artist,
|
|
|
|
(state) => state.settings.ui.item.enableColorImpairedMode,
|
|
|
|
(state) => state.customFilters,
|
|
|
|
selectIsPopulated,
|
|
|
|
(state) => state.tags,
|
|
|
|
selectErrors,
|
|
|
|
(state) => state.settings.ui,
|
|
|
|
selectAppProps,
|
|
|
|
(state) => state.settings.qualityProfiles,
|
|
|
|
|
|
|
|
(state) => state.settings.languageProfiles,
|
|
|
|
|
|
|
|
(state) => state.settings.metadataProfiles,
|
|
|
|
|
|
|
|
(state) => state.settings.importLists,
|
|
|
|
|
|
|
|
(state) => state.app,
|
|
|
|
|
|
|
|
createDimensionsSelector(),
|
|
|
|
createDimensionsSelector(),
|
|
|
|
(
|
|
|
|
(
|
|
|
|
artist,
|
|
|
|
enableColorImpairedMode,
|
|
|
|
customFilters,
|
|
|
|
isPopulated,
|
|
|
|
tags,
|
|
|
|
errors,
|
|
|
|
uiSettings,
|
|
|
|
|
|
|
|
qualityProfiles,
|
|
|
|
|
|
|
|
languageProfiles,
|
|
|
|
|
|
|
|
metadataProfiles,
|
|
|
|
|
|
|
|
importLists,
|
|
|
|
|
|
|
|
app,
|
|
|
|
app,
|
|
|
|
dimensions
|
|
|
|
dimensions
|
|
|
|
) => {
|
|
|
|
) => {
|
|
|
|
const isPopulated = (
|
|
|
|
|
|
|
|
artist.isPopulated &&
|
|
|
|
|
|
|
|
customFilters.isPopulated &&
|
|
|
|
|
|
|
|
tags.isPopulated &&
|
|
|
|
|
|
|
|
qualityProfiles.isPopulated &&
|
|
|
|
|
|
|
|
languageProfiles.isPopulated &&
|
|
|
|
|
|
|
|
metadataProfiles.isPopulated &&
|
|
|
|
|
|
|
|
importLists.isPopulated &&
|
|
|
|
|
|
|
|
uiSettings.isPopulated
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const hasError = !!(
|
|
|
|
|
|
|
|
artist.error ||
|
|
|
|
|
|
|
|
customFilters.error ||
|
|
|
|
|
|
|
|
tags.error ||
|
|
|
|
|
|
|
|
qualityProfiles.error ||
|
|
|
|
|
|
|
|
languageProfiles.error ||
|
|
|
|
|
|
|
|
metadataProfiles.error ||
|
|
|
|
|
|
|
|
importLists.error ||
|
|
|
|
|
|
|
|
uiSettings.error
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
...app,
|
|
|
|
|
|
|
|
...errors,
|
|
|
|
isPopulated,
|
|
|
|
isPopulated,
|
|
|
|
hasError,
|
|
|
|
|
|
|
|
artistError: artist.error,
|
|
|
|
|
|
|
|
customFiltersError: tags.error,
|
|
|
|
|
|
|
|
tagsError: tags.error,
|
|
|
|
|
|
|
|
qualityProfilesError: qualityProfiles.error,
|
|
|
|
|
|
|
|
languageProfilesError: languageProfiles.error,
|
|
|
|
|
|
|
|
metadataProfilesError: metadataProfiles.error,
|
|
|
|
|
|
|
|
importListsError: importLists.error,
|
|
|
|
|
|
|
|
uiSettingsError: uiSettings.error,
|
|
|
|
|
|
|
|
isSmallScreen: dimensions.isSmallScreen,
|
|
|
|
isSmallScreen: dimensions.isSmallScreen,
|
|
|
|
isSidebarVisible: app.isSidebarVisible,
|
|
|
|
enableColorImpairedMode
|
|
|
|
enableColorImpairedMode: uiSettings.item.enableColorImpairedMode,
|
|
|
|
|
|
|
|
version: app.version,
|
|
|
|
|
|
|
|
isUpdated: app.isUpdated,
|
|
|
|
|
|
|
|
isDisconnected: app.isDisconnected
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|