Fixed: Don't allow interactive import while book match is calculating

Fixes #1238
pull/1362/head
ta264 3 years ago
parent 7be2effa05
commit 326d395da4

@ -455,7 +455,7 @@ class InteractiveImportModalContent extends Component {
<Button <Button
kind={kinds.SUCCESS} kind={kinds.SUCCESS}
isDisabled={!selectedIds.length || !!invalidRowsSelected.length || inconsistentBookReleases} isDisabled={isSaving || !selectedIds.length || !!invalidRowsSelected.length || inconsistentBookReleases}
onPress={this.onImportSelectedPress} onPress={this.onImportSelectedPress}
> >
Import Import

@ -3,6 +3,7 @@ import React, { Component } from 'react';
import BookQuality from 'Book/BookQuality'; import BookQuality from 'Book/BookQuality';
import FileDetails from 'BookFile/FileDetails'; import FileDetails from 'BookFile/FileDetails';
import Icon from 'Components/Icon'; import Icon from 'Components/Icon';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import ConfirmModal from 'Components/Modal/ConfirmModal'; import ConfirmModal from 'Components/Modal/ConfirmModal';
import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableRowCellButton from 'Components/Table/Cells/TableRowCellButton'; import TableRowCellButton from 'Components/Table/Cells/TableRowCellButton';
@ -152,7 +153,8 @@ class InteractiveImportRow extends Component {
additionalFile, additionalFile,
isSelected, isSelected,
onSelectedChange, onSelectedChange,
audioTags audioTags,
isSaving
} = this.props; } = this.props;
const { const {
@ -255,7 +257,14 @@ class InteractiveImportRow extends Component {
<TableRowCell> <TableRowCell>
{ {
rejections && rejections.length ? isSaving &&
<LoadingIndicator
className={styles.loading}
size={20}
/>
}
{
!isSaving && rejections && rejections.length ?
<Popover <Popover
anchor={ anchor={
<Icon <Icon

Loading…
Cancel
Save