Fixed: UI and Command manager updates

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick 2018-08-28 23:01:02 -04:00
parent d9a51a1d02
commit ba96dad8c7
40 changed files with 301 additions and 255 deletions

View file

@ -105,7 +105,6 @@ class CutoffUnmet extends Component {
filters,
columns,
totalRecords,
isSearchingForAlbums,
isSearchingForCutoffUnmetAlbums,
isSaving,
onFilterSelect,
@ -129,8 +128,7 @@ class CutoffUnmet extends Component {
<PageToolbarButton
label="Search Selected"
iconName={icons.SEARCH}
isDisabled={!itemsSelected}
isSpinning={isSearchingForAlbums}
isDisabled={!itemsSelected || isSearchingForCutoffUnmetAlbums}
onPress={this.onSearchSelectedPress}
/>
@ -255,7 +253,6 @@ CutoffUnmet.propTypes = {
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
totalRecords: PropTypes.number,
isSearchingForAlbums: PropTypes.bool.isRequired,
isSearchingForCutoffUnmetAlbums: PropTypes.bool.isRequired,
isSaving: PropTypes.bool.isRequired,
onFilterSelect: PropTypes.func.isRequired,

View file

@ -20,11 +20,9 @@ function createMapStateToProps() {
(state) => state.wanted.cutoffUnmet,
createCommandsSelector(),
(cutoffUnmet, commands) => {
const isSearchingForAlbums = _.some(commands, { name: commandNames.ALBUM_SEARCH });
const isSearchingForCutoffUnmetAlbums = _.some(commands, { name: commandNames.CUTOFF_UNMET_ALBUM_SEARCH });
return {
isSearchingForAlbums,
isSearchingForCutoffUnmetAlbums,
isSaving: _.some(cutoffUnmet.items, { isSaving: true }),
...cutoffUnmet

View file

@ -114,7 +114,6 @@ class Missing extends Component {
filters,
columns,
totalRecords,
isSearchingForAlbums,
isSearchingForMissingAlbums,
isSaving,
onFilterSelect,
@ -139,8 +138,7 @@ class Missing extends Component {
<PageToolbarButton
label="Search Selected"
iconName={icons.SEARCH}
isDisabled={!itemsSelected}
isSpinning={isSearchingForAlbums}
isDisabled={!itemsSelected || isSearchingForMissingAlbums}
onPress={this.onSearchSelectedPress}
/>
@ -277,7 +275,6 @@ Missing.propTypes = {
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
totalRecords: PropTypes.number,
isSearchingForAlbums: PropTypes.bool.isRequired,
isSearchingForMissingAlbums: PropTypes.bool.isRequired,
isSaving: PropTypes.bool.isRequired,
onFilterSelect: PropTypes.func.isRequired,

View file

@ -19,11 +19,9 @@ function createMapStateToProps() {
(state) => state.wanted.missing,
createCommandsSelector(),
(missing, commands) => {
const isSearchingForAlbums = _.some(commands, { name: commandNames.ALBUM_SEARCH });
const isSearchingForMissingAlbums = _.some(commands, { name: commandNames.MISSING_ALBUM_SEARCH });
return {
isSearchingForAlbums,
isSearchingForMissingAlbums,
isSaving: _.some(missing.items, { isSaving: true }),
...missing