mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
Renames in Frontend
This commit is contained in:
@@ -70,7 +70,7 @@ class UnmappedFilesTable extends Component {
|
||||
onTableOptionChange,
|
||||
onSortPress,
|
||||
isScanningFolders,
|
||||
onAddMissingArtistsPress,
|
||||
onAddMissingAuthorsPress,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
@@ -84,10 +84,10 @@ class UnmappedFilesTable extends Component {
|
||||
<PageToolbarSection>
|
||||
<PageToolbarButton
|
||||
label="Add missing"
|
||||
iconName={icons.ADD_MISSING_ARTISTS}
|
||||
iconName={icons.ADD_MISSING_AUTHORS}
|
||||
isDisabled={isPopulated && !error && !items.length}
|
||||
isSpinning={isScanningFolders}
|
||||
onPress={onAddMissingArtistsPress}
|
||||
onPress={onAddMissingAuthorsPress}
|
||||
/>
|
||||
</PageToolbarSection>
|
||||
|
||||
@@ -117,7 +117,7 @@ class UnmappedFilesTable extends Component {
|
||||
{
|
||||
isPopulated && !error && !items.length &&
|
||||
<div>
|
||||
Success! My work is done, all files on disk are matched to known tracks.
|
||||
Success! My work is done, all files on disk are matched to known books.
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ UnmappedFilesTable.propTypes = {
|
||||
onSortPress: PropTypes.func.isRequired,
|
||||
deleteUnmappedFile: PropTypes.func.isRequired,
|
||||
isScanningFolders: PropTypes.bool.isRequired,
|
||||
onAddMissingArtistsPress: PropTypes.func.isRequired
|
||||
onAddMissingAuthorsPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default UnmappedFilesTable;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { registerPagePopulator, unregisterPagePopulator } from 'Utilities/pagePo
|
||||
import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector';
|
||||
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
|
||||
import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector';
|
||||
import { fetchTrackFiles, deleteTrackFile, setTrackFilesSort, setTrackFilesTableOption } from 'Store/Actions/trackFileActions';
|
||||
import { fetchBookFiles, deleteBookFile, setBookFilesSort, setBookFilesTableOption } from 'Store/Actions/bookFileActions';
|
||||
import { executeCommand } from 'Store/Actions/commandActions';
|
||||
import * as commandNames from 'Commands/commandNames';
|
||||
import withCurrentPage from 'Components/withCurrentPage';
|
||||
@@ -15,19 +15,19 @@ import UnmappedFilesTable from './UnmappedFilesTable';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createClientSideCollectionSelector('trackFiles'),
|
||||
createClientSideCollectionSelector('bookFiles'),
|
||||
createCommandExecutingSelector(commandNames.RESCAN_FOLDERS),
|
||||
createDimensionsSelector(),
|
||||
(
|
||||
trackFiles,
|
||||
bookFiles,
|
||||
isScanningFolders,
|
||||
dimensionsState
|
||||
) => {
|
||||
// trackFiles could pick up mapped entries via signalR so filter again here
|
||||
// bookFiles could pick up mapped entries via signalR so filter again here
|
||||
const {
|
||||
items,
|
||||
...otherProps
|
||||
} = trackFiles;
|
||||
} = bookFiles;
|
||||
const unmappedFiles = _.filter(items, { bookId: 0 });
|
||||
return {
|
||||
items: unmappedFiles,
|
||||
@@ -42,25 +42,25 @@ function createMapStateToProps() {
|
||||
function createMapDispatchToProps(dispatch, props) {
|
||||
return {
|
||||
onTableOptionChange(payload) {
|
||||
dispatch(setTrackFilesTableOption(payload));
|
||||
dispatch(setBookFilesTableOption(payload));
|
||||
},
|
||||
|
||||
onSortPress(sortKey) {
|
||||
dispatch(setTrackFilesSort({ sortKey }));
|
||||
dispatch(setBookFilesSort({ sortKey }));
|
||||
},
|
||||
|
||||
fetchUnmappedFiles() {
|
||||
dispatch(fetchTrackFiles({ unmapped: true }));
|
||||
dispatch(fetchBookFiles({ unmapped: true }));
|
||||
},
|
||||
|
||||
deleteUnmappedFile(id) {
|
||||
dispatch(deleteTrackFile({ id }));
|
||||
dispatch(deleteBookFile({ id }));
|
||||
},
|
||||
|
||||
onAddMissingArtistsPress() {
|
||||
onAddMissingAuthorsPress() {
|
||||
dispatch(executeCommand({
|
||||
name: commandNames.RESCAN_FOLDERS,
|
||||
addNewArtists: true,
|
||||
addNewAuthors: true,
|
||||
filter: 'matched'
|
||||
}));
|
||||
}
|
||||
@@ -73,7 +73,7 @@ class UnmappedFilesTableConnector extends Component {
|
||||
// Lifecycle
|
||||
|
||||
componentDidMount() {
|
||||
registerPagePopulator(this.repopulate, ['trackFileUpdated']);
|
||||
registerPagePopulator(this.repopulate, ['bookFileUpdated']);
|
||||
|
||||
this.repopulate();
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import IconButton from 'Components/Link/IconButton';
|
||||
import ConfirmModal from 'Components/Modal/ConfirmModal';
|
||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
||||
import TrackQuality from 'Album/TrackQuality';
|
||||
import BookQuality from 'Book/BookQuality';
|
||||
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
|
||||
import FileDetailsModal from 'TrackFile/FileDetailsModal';
|
||||
import FileDetailsModal from 'BookFile/FileDetailsModal';
|
||||
import styles from './UnmappedFilesTableRow.css';
|
||||
|
||||
class UnmappedFilesTableRow extends Component {
|
||||
@@ -131,7 +131,7 @@ class UnmappedFilesTableRow extends Component {
|
||||
key={name}
|
||||
className={styles[name]}
|
||||
>
|
||||
<TrackQuality
|
||||
<BookQuality
|
||||
quality={quality}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
@@ -187,7 +187,7 @@ class UnmappedFilesTableRow extends Component {
|
||||
<ConfirmModal
|
||||
isOpen={isConfirmDeleteModalOpen}
|
||||
kind={kinds.DANGER}
|
||||
title="Delete Track File"
|
||||
title="Delete Book File"
|
||||
message={`Are you sure you want to delete ${path}?`}
|
||||
confirmLabel="Delete"
|
||||
onConfirm={this.onConfirmDelete}
|
||||
|
||||
Reference in New Issue
Block a user