mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
Update UI Packages
Align with Lidarr
This commit is contained in:
@@ -30,7 +30,7 @@ class SelectAuthorModalContent extends Component {
|
||||
|
||||
onFilterChange = ({ value }) => {
|
||||
this.setState({ filter: value.toLowerCase() });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -56,7 +56,7 @@ class SelectAuthorModalContentConnector extends Component {
|
||||
this.props.saveInteractiveImportItem({ id: ids });
|
||||
|
||||
this.props.onModalClose(true);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -10,7 +10,7 @@ class SelectAuthorRow extends Component {
|
||||
|
||||
onPress = () => {
|
||||
this.props.onAuthorSelect(this.props.id);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -53,7 +53,7 @@ class SelectBookModalContent extends Component {
|
||||
|
||||
onFilterChange = ({ value }) => {
|
||||
this.setState({ filter: value.toLowerCase() });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -53,7 +53,7 @@ class SelectBookModalContentConnector extends Component {
|
||||
|
||||
onSortPress = (sortKey, sortDirection) => {
|
||||
this.props.setInteractiveImportBooksSort({ sortKey, sortDirection });
|
||||
}
|
||||
};
|
||||
|
||||
onBookSelect = (bookId) => {
|
||||
const book = _.find(this.props.items, { id: bookId });
|
||||
@@ -72,7 +72,7 @@ class SelectBookModalContentConnector extends Component {
|
||||
this.props.saveInteractiveImportItem({ id: ids });
|
||||
|
||||
this.props.onModalClose(true);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -27,7 +27,7 @@ class SelectBookRow extends Component {
|
||||
|
||||
onPress = () => {
|
||||
this.props.onBookSelect(this.props.id);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -56,11 +56,11 @@ class SelectEditionModalContentConnector extends Component {
|
||||
const bookId = this.props.books.map((b) => b.book.id);
|
||||
|
||||
this.props.fetchEditions({ bookId });
|
||||
}
|
||||
};
|
||||
|
||||
unpopulate = () => {
|
||||
this.props.clearEditions();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
@@ -81,7 +81,7 @@ class SelectEditionModalContentConnector extends Component {
|
||||
this.props.saveInteractiveImportItem({ id: ids });
|
||||
|
||||
this.props.onModalClose(true);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -14,7 +14,7 @@ class SelectEditionRow extends Component {
|
||||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.props.onEditionSelect(parseInt(name), value);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -46,19 +46,19 @@ class InteractiveImportSelectFolderModalContent extends Component {
|
||||
|
||||
onPathChange = ({ value }) => {
|
||||
this.setState({ folder: value });
|
||||
}
|
||||
};
|
||||
|
||||
onRecentPathPress = (folder) => {
|
||||
this.setState({ folder });
|
||||
}
|
||||
};
|
||||
|
||||
onQuickImportPress = () => {
|
||||
this.props.onQuickImportPress(this.state.folder);
|
||||
}
|
||||
};
|
||||
|
||||
onInteractiveImportPress = () => {
|
||||
this.props.onInteractiveImportPress(this.state.folder);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+3
-3
@@ -38,16 +38,16 @@ class InteractiveImportSelectFolderModalContentConnector extends Component {
|
||||
});
|
||||
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
onInteractiveImportPress = (folder) => {
|
||||
this.props.addRecentFolder({ folder });
|
||||
this.props.onFolderSelect(folder);
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveRecentFolderPress = (folder) => {
|
||||
this.props.removeRecentFolder({ folder });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -15,7 +15,7 @@ class RecentFolderRow extends Component {
|
||||
|
||||
onPress = () => {
|
||||
this.props.onPress(this.props.folder);
|
||||
}
|
||||
};
|
||||
|
||||
onRemovePress = (event) => {
|
||||
event.stopPropagation();
|
||||
@@ -26,7 +26,7 @@ class RecentFolderRow extends Component {
|
||||
} = this.props;
|
||||
|
||||
onRemoveRecentFolderPress(folder);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -132,20 +132,20 @@ class InteractiveImportModalContent extends Component {
|
||||
|
||||
getSelectedIds = () => {
|
||||
return getSelectedIds(this.state.selectedState);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onSelectAllChange = ({ value }) => {
|
||||
this.setState(selectAll(this.state.selectedState, value));
|
||||
}
|
||||
};
|
||||
|
||||
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
||||
this.setState((state) => {
|
||||
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onValidRowChange = (id, isValid) => {
|
||||
this.setState((state, props) => {
|
||||
@@ -155,7 +155,7 @@ class InteractiveImportModalContent extends Component {
|
||||
const newstate = isValid ? _.without(currentInvalid, id) : _.union(currentInvalid, [id]);
|
||||
return { invalidRowsSelected: newstate };
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onImportSelectedPress = () => {
|
||||
if (!this.props.replaceExistingFiles) {
|
||||
@@ -177,7 +177,7 @@ class InteractiveImportModalContent extends Component {
|
||||
booksImported,
|
||||
isConfirmImportModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmImportPress = () => {
|
||||
const {
|
||||
@@ -191,23 +191,23 @@ class InteractiveImportModalContent extends Component {
|
||||
const finalImportMode = downloadId || !showImportMode ? 'auto' : importMode;
|
||||
|
||||
onImportSelectedPress(selected, finalImportMode);
|
||||
}
|
||||
};
|
||||
|
||||
onFilterExistingFilesChange = (value) => {
|
||||
this.props.onFilterExistingFilesChange(value !== filterExistingFilesOptions.ALL);
|
||||
}
|
||||
};
|
||||
|
||||
onReplaceExistingFilesChange = (value) => {
|
||||
this.props.onReplaceExistingFilesChange(value === replaceExistingFilesOptions.DELETE);
|
||||
}
|
||||
};
|
||||
|
||||
onImportModeChange = ({ value }) => {
|
||||
this.props.onImportModeChange(value);
|
||||
}
|
||||
};
|
||||
|
||||
onSelectModalSelect = ({ value }) => {
|
||||
this.setState({ selectModalOpen: value });
|
||||
}
|
||||
};
|
||||
|
||||
onClearBookMappingPress = () => {
|
||||
const selectedIds = this.getSelectedIds();
|
||||
@@ -218,19 +218,19 @@ class InteractiveImportModalContent extends Component {
|
||||
rejections: []
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onGetBookMappingPress = () => {
|
||||
this.props.saveInteractiveImportItem({ id: this.getSelectedIds() });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectModalClose = () => {
|
||||
this.setState({ selectModalOpen: null });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmImportModalClose = () => {
|
||||
this.setState({ isConfirmImportModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+5
-5
@@ -103,19 +103,19 @@ class InteractiveImportModalContentConnector extends Component {
|
||||
|
||||
onSortPress = (sortKey, sortDirection) => {
|
||||
this.props.setInteractiveImportSort({ sortKey, sortDirection });
|
||||
}
|
||||
};
|
||||
|
||||
onFilterExistingFilesChange = (filterExistingFiles) => {
|
||||
this.setState({ filterExistingFiles });
|
||||
}
|
||||
};
|
||||
|
||||
onReplaceExistingFilesChange = (replaceExistingFiles) => {
|
||||
this.setState({ replaceExistingFiles });
|
||||
}
|
||||
};
|
||||
|
||||
onImportModeChange = (importMode) => {
|
||||
this.props.setInteractiveImportMode({ importMode });
|
||||
}
|
||||
};
|
||||
|
||||
onImportSelectedPress = (selected, importMode) => {
|
||||
const files = [];
|
||||
@@ -171,7 +171,7 @@ class InteractiveImportModalContentConnector extends Component {
|
||||
});
|
||||
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -102,45 +102,45 @@ class InteractiveImportRow extends Component {
|
||||
if (!isSelected && value === true) {
|
||||
this.props.onSelectedChange({ id, value });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onDetailsPress = () => {
|
||||
this.setState({ isDetailsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDetailsModalClose = () => {
|
||||
this.setState({ isDetailsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAuthorPress = () => {
|
||||
this.setState({ isSelectAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectBookPress = () => {
|
||||
this.setState({ isSelectBookModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectQualityPress = () => {
|
||||
this.setState({ isSelectQualityModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAuthorModalClose = (changed) => {
|
||||
this.setState({ isSelectAuthorModalOpen: false });
|
||||
this.selectRowAfterChange(changed);
|
||||
}
|
||||
};
|
||||
|
||||
onSelectBookModalClose = (changed) => {
|
||||
this.setState({ isSelectBookModalOpen: false });
|
||||
this.selectRowAfterChange(changed);
|
||||
}
|
||||
};
|
||||
|
||||
onSelectQualityModalClose = (changed) => {
|
||||
this.setState({ isSelectQualityModalOpen: false });
|
||||
this.selectRowAfterChange(changed);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -28,7 +28,7 @@ class InteractiveImportModal extends Component {
|
||||
|
||||
onFolderSelect = (folder) => {
|
||||
this.setState({ folder });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -39,19 +39,19 @@ class SelectQualityModalContent extends Component {
|
||||
|
||||
onQualityChange = ({ value }) => {
|
||||
this.setState({ qualityId: parseInt(value) });
|
||||
}
|
||||
};
|
||||
|
||||
onProperChange = ({ value }) => {
|
||||
this.setState({ proper: value });
|
||||
}
|
||||
};
|
||||
|
||||
onRealChange = ({ value }) => {
|
||||
this.setState({ real: value });
|
||||
}
|
||||
};
|
||||
|
||||
onQualitySelect = () => {
|
||||
this.props.onQualitySelect(this.state);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -43,7 +43,7 @@ class SelectQualityModalContentConnector extends Component {
|
||||
if (!this.props.isPopulated) {
|
||||
this.props.dispatchFetchQualityProfileSchema();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
@@ -66,7 +66,7 @@ class SelectQualityModalContentConnector extends Component {
|
||||
});
|
||||
|
||||
this.props.onModalClose(true);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
Reference in New Issue
Block a user