mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-17 21:25:39 -04:00
Renames in Frontend
This commit is contained in:
@@ -85,7 +85,7 @@ class CutoffUnmet extends Component {
|
||||
onToggleSelectedPress = () => {
|
||||
const bookIds = this.getSelectedIds();
|
||||
|
||||
this.props.batchToggleCutoffUnmetAlbums({
|
||||
this.props.batchToggleCutoffUnmetBooks({
|
||||
bookIds,
|
||||
monitored: !getMonitoredValue(this.props)
|
||||
});
|
||||
@@ -117,7 +117,7 @@ class CutoffUnmet extends Component {
|
||||
filters,
|
||||
columns,
|
||||
totalRecords,
|
||||
isSearchingForCutoffUnmetAlbums,
|
||||
isSearchingForCutoffUnmetBooks,
|
||||
isSaving,
|
||||
onFilterSelect,
|
||||
...otherProps
|
||||
@@ -140,7 +140,7 @@ class CutoffUnmet extends Component {
|
||||
<PageToolbarButton
|
||||
label="Search Selected"
|
||||
iconName={icons.SEARCH}
|
||||
isDisabled={!itemsSelected || isSearchingForCutoffUnmetAlbums}
|
||||
isDisabled={!itemsSelected || isSearchingForCutoffUnmetBooks}
|
||||
onPress={this.onSearchSelectedPress}
|
||||
/>
|
||||
|
||||
@@ -158,7 +158,7 @@ class CutoffUnmet extends Component {
|
||||
label="Search All"
|
||||
iconName={icons.SEARCH}
|
||||
isDisabled={!items.length}
|
||||
isSpinning={isSearchingForCutoffUnmetAlbums}
|
||||
isSpinning={isSearchingForCutoffUnmetBooks}
|
||||
onPress={this.onSearchAllCutoffUnmetPress}
|
||||
/>
|
||||
|
||||
@@ -233,11 +233,11 @@ class CutoffUnmet extends Component {
|
||||
<ConfirmModal
|
||||
isOpen={isConfirmSearchAllCutoffUnmetModalOpen}
|
||||
kind={kinds.DANGER}
|
||||
title="Search for all Cutoff Unmet albums"
|
||||
title="Search for all Cutoff Unmet books"
|
||||
message={
|
||||
<div>
|
||||
<div>
|
||||
Are you sure you want to search for all {totalRecords} Cutoff Unmet albums?
|
||||
Are you sure you want to search for all {totalRecords} Cutoff Unmet books?
|
||||
</div>
|
||||
<div>
|
||||
This cannot be cancelled once started without restarting Readarr.
|
||||
@@ -265,11 +265,11 @@ CutoffUnmet.propTypes = {
|
||||
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
totalRecords: PropTypes.number,
|
||||
isSearchingForCutoffUnmetAlbums: PropTypes.bool.isRequired,
|
||||
isSearchingForCutoffUnmetBooks: PropTypes.bool.isRequired,
|
||||
isSaving: PropTypes.bool.isRequired,
|
||||
onFilterSelect: PropTypes.func.isRequired,
|
||||
onSearchSelectedPress: PropTypes.func.isRequired,
|
||||
batchToggleCutoffUnmetAlbums: PropTypes.func.isRequired,
|
||||
batchToggleCutoffUnmetBooks: PropTypes.func.isRequired,
|
||||
onSearchAllCutoffUnmetPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
||||
@@ -10,18 +10,18 @@ import createCommandExecutingSelector from 'Store/Selectors/createCommandExecuti
|
||||
import * as wantedActions from 'Store/Actions/wantedActions';
|
||||
import { executeCommand } from 'Store/Actions/commandActions';
|
||||
import { fetchQueueDetails, clearQueueDetails } from 'Store/Actions/queueActions';
|
||||
import { fetchTrackFiles, clearTrackFiles } from 'Store/Actions/trackFileActions';
|
||||
import { fetchBookFiles, clearBookFiles } from 'Store/Actions/bookFileActions';
|
||||
import * as commandNames from 'Commands/commandNames';
|
||||
import CutoffUnmet from './CutoffUnmet';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.wanted.cutoffUnmet,
|
||||
createCommandExecutingSelector(commandNames.CUTOFF_UNMET_ALBUM_SEARCH),
|
||||
(cutoffUnmet, isSearchingForCutoffUnmetAlbums) => {
|
||||
createCommandExecutingSelector(commandNames.CUTOFF_UNMET_BOOK_SEARCH),
|
||||
(cutoffUnmet, isSearchingForCutoffUnmetBooks) => {
|
||||
|
||||
return {
|
||||
isSearchingForCutoffUnmetAlbums,
|
||||
isSearchingForCutoffUnmetBooks,
|
||||
isSaving: cutoffUnmet.items.filter((m) => m.isSaving).length > 1,
|
||||
...cutoffUnmet
|
||||
};
|
||||
@@ -34,8 +34,8 @@ const mapDispatchToProps = {
|
||||
executeCommand,
|
||||
fetchQueueDetails,
|
||||
clearQueueDetails,
|
||||
fetchTrackFiles,
|
||||
clearTrackFiles
|
||||
fetchBookFiles,
|
||||
clearBookFiles
|
||||
};
|
||||
|
||||
class CutoffUnmetConnector extends Component {
|
||||
@@ -50,7 +50,7 @@ class CutoffUnmetConnector extends Component {
|
||||
gotoCutoffUnmetFirstPage
|
||||
} = this.props;
|
||||
|
||||
registerPagePopulator(this.repopulate, ['trackFileUpdated']);
|
||||
registerPagePopulator(this.repopulate, ['bookFileUpdated']);
|
||||
|
||||
if (useCurrentPage) {
|
||||
fetchCutoffUnmet();
|
||||
@@ -62,12 +62,12 @@ class CutoffUnmetConnector extends Component {
|
||||
componentDidUpdate(prevProps) {
|
||||
if (hasDifferentItems(prevProps.items, this.props.items)) {
|
||||
const bookIds = selectUniqueIds(this.props.items, 'id');
|
||||
const trackFileIds = selectUniqueIds(this.props.items, 'trackFileId');
|
||||
const bookFileIds = selectUniqueIds(this.props.items, 'bookFileId');
|
||||
|
||||
this.props.fetchQueueDetails({ bookIds });
|
||||
|
||||
if (trackFileIds.length) {
|
||||
this.props.fetchTrackFiles({ trackFileIds });
|
||||
if (bookFileIds.length) {
|
||||
this.props.fetchBookFiles({ bookFileIds });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class CutoffUnmetConnector extends Component {
|
||||
unregisterPagePopulator(this.repopulate);
|
||||
this.props.clearCutoffUnmet();
|
||||
this.props.clearQueueDetails();
|
||||
this.props.clearTrackFiles();
|
||||
this.props.clearBookFiles();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -127,14 +127,14 @@ class CutoffUnmetConnector extends Component {
|
||||
|
||||
onSearchSelectedPress = (selected) => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.ALBUM_SEARCH,
|
||||
name: commandNames.BOOK_SEARCH,
|
||||
bookIds: selected
|
||||
});
|
||||
}
|
||||
|
||||
onSearchAllCutoffUnmetPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.CUTOFF_UNMET_ALBUM_SEARCH
|
||||
name: commandNames.CUTOFF_UNMET_BOOK_SEARCH
|
||||
});
|
||||
}
|
||||
|
||||
@@ -177,8 +177,8 @@ CutoffUnmetConnector.propTypes = {
|
||||
executeCommand: PropTypes.func.isRequired,
|
||||
fetchQueueDetails: PropTypes.func.isRequired,
|
||||
clearQueueDetails: PropTypes.func.isRequired,
|
||||
fetchTrackFiles: PropTypes.func.isRequired,
|
||||
clearTrackFiles: PropTypes.func.isRequired
|
||||
fetchBookFiles: PropTypes.func.isRequired,
|
||||
clearBookFiles: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default withCurrentPage(
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import albumEntities from 'Album/albumEntities';
|
||||
import AlbumTitleLink from 'Album/AlbumTitleLink';
|
||||
import EpisodeStatusConnector from 'Album/EpisodeStatusConnector';
|
||||
import AlbumSearchCellConnector from 'Album/AlbumSearchCellConnector';
|
||||
import ArtistNameLink from 'Artist/ArtistNameLink';
|
||||
import bookEntities from 'Book/bookEntities';
|
||||
import BookTitleLink from 'Book/BookTitleLink';
|
||||
import EpisodeStatusConnector from 'Book/EpisodeStatusConnector';
|
||||
import BookSearchCellConnector from 'Book/BookSearchCellConnector';
|
||||
import AuthorNameLink from 'Author/AuthorNameLink';
|
||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||
import TableRow from 'Components/Table/TableRow';
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
@@ -14,8 +14,8 @@ import styles from './CutoffUnmetRow.css';
|
||||
function CutoffUnmetRow(props) {
|
||||
const {
|
||||
id,
|
||||
trackFileId,
|
||||
artist,
|
||||
bookFileId,
|
||||
author,
|
||||
releaseDate,
|
||||
titleSlug,
|
||||
title,
|
||||
@@ -25,7 +25,7 @@ function CutoffUnmetRow(props) {
|
||||
onSelectedChange
|
||||
} = props;
|
||||
|
||||
if (!artist) {
|
||||
if (!author) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ function CutoffUnmetRow(props) {
|
||||
if (name === 'authors.sortName') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
<ArtistNameLink
|
||||
titleSlug={artist.titleSlug}
|
||||
artistName={artist.artistName}
|
||||
<AuthorNameLink
|
||||
titleSlug={author.titleSlug}
|
||||
authorName={author.authorName}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
@@ -62,7 +62,7 @@ function CutoffUnmetRow(props) {
|
||||
if (name === 'books.title') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
<AlbumTitleLink
|
||||
<BookTitleLink
|
||||
titleSlug={titleSlug}
|
||||
title={title}
|
||||
disambiguation={disambiguation}
|
||||
@@ -88,8 +88,8 @@ function CutoffUnmetRow(props) {
|
||||
>
|
||||
<EpisodeStatusConnector
|
||||
bookId={id}
|
||||
trackFileId={trackFileId}
|
||||
albumEntity={albumEntities.WANTED_CUTOFF_UNMET}
|
||||
bookFileId={bookFileId}
|
||||
bookEntity={bookEntities.WANTED_CUTOFF_UNMET}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
@@ -97,13 +97,13 @@ function CutoffUnmetRow(props) {
|
||||
|
||||
if (name === 'actions') {
|
||||
return (
|
||||
<AlbumSearchCellConnector
|
||||
<BookSearchCellConnector
|
||||
key={name}
|
||||
bookId={id}
|
||||
authorId={artist.id}
|
||||
albumTitle={title}
|
||||
albumEntity={albumEntities.WANTED_CUTOFF_UNMET}
|
||||
showOpenArtistButton={true}
|
||||
authorId={author.id}
|
||||
bookTitle={title}
|
||||
bookEntity={bookEntities.WANTED_CUTOFF_UNMET}
|
||||
showOpenAuthorButton={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -117,8 +117,8 @@ function CutoffUnmetRow(props) {
|
||||
|
||||
CutoffUnmetRow.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
trackFileId: PropTypes.number,
|
||||
artist: PropTypes.object.isRequired,
|
||||
bookFileId: PropTypes.number,
|
||||
author: PropTypes.object.isRequired,
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
titleSlug: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import createArtistSelector from 'Store/Selectors/createArtistSelector';
|
||||
import createAuthorSelector from 'Store/Selectors/createAuthorSelector';
|
||||
import CutoffUnmetRow from './CutoffUnmetRow';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createArtistSelector(),
|
||||
(artist) => {
|
||||
createAuthorSelector(),
|
||||
(author) => {
|
||||
return {
|
||||
artist
|
||||
author
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -86,7 +86,7 @@ class Missing extends Component {
|
||||
onToggleSelectedPress = () => {
|
||||
const bookIds = this.getSelectedIds();
|
||||
|
||||
this.props.batchToggleMissingAlbums({
|
||||
this.props.batchToggleMissingBooks({
|
||||
bookIds,
|
||||
monitored: !getMonitoredValue(this.props)
|
||||
});
|
||||
@@ -126,7 +126,7 @@ class Missing extends Component {
|
||||
filters,
|
||||
columns,
|
||||
totalRecords,
|
||||
isSearchingForMissingAlbums,
|
||||
isSearchingForMissingBooks,
|
||||
isSaving,
|
||||
onFilterSelect,
|
||||
...otherProps
|
||||
@@ -150,7 +150,7 @@ class Missing extends Component {
|
||||
<PageToolbarButton
|
||||
label="Search Selected"
|
||||
iconName={icons.SEARCH}
|
||||
isDisabled={!itemsSelected || isSearchingForMissingAlbums}
|
||||
isDisabled={!itemsSelected || isSearchingForMissingBooks}
|
||||
onPress={this.onSearchSelectedPress}
|
||||
/>
|
||||
|
||||
@@ -168,7 +168,7 @@ class Missing extends Component {
|
||||
label="Search All"
|
||||
iconName={icons.SEARCH}
|
||||
isDisabled={!items.length}
|
||||
isSpinning={isSearchingForMissingAlbums}
|
||||
isSpinning={isSearchingForMissingBooks}
|
||||
onPress={this.onSearchAllMissingPress}
|
||||
/>
|
||||
|
||||
@@ -250,11 +250,11 @@ class Missing extends Component {
|
||||
<ConfirmModal
|
||||
isOpen={isConfirmSearchAllMissingModalOpen}
|
||||
kind={kinds.DANGER}
|
||||
title="Search for all missing albums"
|
||||
title="Search for all missing books"
|
||||
message={
|
||||
<div>
|
||||
<div>
|
||||
Are you sure you want to search for all {totalRecords} missing albums?
|
||||
Are you sure you want to search for all {totalRecords} missing books?
|
||||
</div>
|
||||
<div>
|
||||
This cannot be cancelled once started without restarting Readarr.
|
||||
@@ -288,11 +288,11 @@ Missing.propTypes = {
|
||||
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
totalRecords: PropTypes.number,
|
||||
isSearchingForMissingAlbums: PropTypes.bool.isRequired,
|
||||
isSearchingForMissingBooks: PropTypes.bool.isRequired,
|
||||
isSaving: PropTypes.bool.isRequired,
|
||||
onFilterSelect: PropTypes.func.isRequired,
|
||||
onSearchSelectedPress: PropTypes.func.isRequired,
|
||||
batchToggleMissingAlbums: PropTypes.func.isRequired,
|
||||
batchToggleMissingBooks: PropTypes.func.isRequired,
|
||||
onSearchAllMissingPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ import Missing from './Missing';
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.wanted.missing,
|
||||
createCommandExecutingSelector(commandNames.MISSING_ALBUM_SEARCH),
|
||||
(missing, isSearchingForMissingAlbums) => {
|
||||
createCommandExecutingSelector(commandNames.MISSING_BOOK_SEARCH),
|
||||
(missing, isSearchingForMissingBooks) => {
|
||||
|
||||
return {
|
||||
isSearchingForMissingAlbums,
|
||||
isSearchingForMissingBooks,
|
||||
isSaving: missing.items.filter((m) => m.isSaving).length > 1,
|
||||
...missing
|
||||
};
|
||||
@@ -47,7 +47,7 @@ class MissingConnector extends Component {
|
||||
gotoMissingFirstPage
|
||||
} = this.props;
|
||||
|
||||
registerPagePopulator(this.repopulate, ['trackFileUpdated']);
|
||||
registerPagePopulator(this.repopulate, ['bookFileUpdated']);
|
||||
|
||||
if (useCurrentPage) {
|
||||
fetchMissing();
|
||||
@@ -117,14 +117,14 @@ class MissingConnector extends Component {
|
||||
|
||||
onSearchSelectedPress = (selected) => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.ALBUM_SEARCH,
|
||||
name: commandNames.BOOK_SEARCH,
|
||||
bookIds: selected
|
||||
});
|
||||
}
|
||||
|
||||
onSearchAllMissingPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.MISSING_ALBUM_SEARCH
|
||||
name: commandNames.MISSING_BOOK_SEARCH
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import albumEntities from 'Album/albumEntities';
|
||||
import AlbumTitleLink from 'Album/AlbumTitleLink';
|
||||
import AlbumSearchCellConnector from 'Album/AlbumSearchCellConnector';
|
||||
import ArtistNameLink from 'Artist/ArtistNameLink';
|
||||
import bookEntities from 'Book/bookEntities';
|
||||
import BookTitleLink from 'Book/BookTitleLink';
|
||||
import BookSearchCellConnector from 'Book/BookSearchCellConnector';
|
||||
import AuthorNameLink from 'Author/AuthorNameLink';
|
||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||
import TableRow from 'Components/Table/TableRow';
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
@@ -12,7 +12,7 @@ import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||
function MissingRow(props) {
|
||||
const {
|
||||
id,
|
||||
artist,
|
||||
author,
|
||||
releaseDate,
|
||||
titleSlug,
|
||||
title,
|
||||
@@ -22,7 +22,7 @@ function MissingRow(props) {
|
||||
onSelectedChange
|
||||
} = props;
|
||||
|
||||
if (!artist) {
|
||||
if (!author) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -48,9 +48,9 @@ function MissingRow(props) {
|
||||
if (name === 'authors.sortName') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
<ArtistNameLink
|
||||
titleSlug={artist.titleSlug}
|
||||
artistName={artist.artistName}
|
||||
<AuthorNameLink
|
||||
titleSlug={author.titleSlug}
|
||||
authorName={author.authorName}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
@@ -59,7 +59,7 @@ function MissingRow(props) {
|
||||
if (name === 'books.title') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
<AlbumTitleLink
|
||||
<BookTitleLink
|
||||
titleSlug={titleSlug}
|
||||
title={title}
|
||||
disambiguation={disambiguation}
|
||||
@@ -79,13 +79,13 @@ function MissingRow(props) {
|
||||
|
||||
if (name === 'actions') {
|
||||
return (
|
||||
<AlbumSearchCellConnector
|
||||
<BookSearchCellConnector
|
||||
key={name}
|
||||
bookId={id}
|
||||
authorId={artist.id}
|
||||
albumTitle={title}
|
||||
albumEntity={albumEntities.WANTED_MISSING}
|
||||
showOpenArtistButton={true}
|
||||
authorId={author.id}
|
||||
bookTitle={title}
|
||||
bookEntity={bookEntities.WANTED_MISSING}
|
||||
showOpenAuthorButton={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -99,7 +99,7 @@ function MissingRow(props) {
|
||||
|
||||
MissingRow.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
artist: PropTypes.object.isRequired,
|
||||
author: PropTypes.object.isRequired,
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
titleSlug: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import createArtistSelector from 'Store/Selectors/createArtistSelector';
|
||||
import createAuthorSelector from 'Store/Selectors/createAuthorSelector';
|
||||
import MissingRow from './MissingRow';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createArtistSelector(),
|
||||
(artist) => {
|
||||
createAuthorSelector(),
|
||||
(author) => {
|
||||
return {
|
||||
artist
|
||||
author
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user