mirror of
https://github.com/Readarr/Readarr
synced 2026-01-27 01:42:48 +01:00
Update UI Packages
Align with Lidarr
This commit is contained in:
parent
fbdc9f3a13
commit
1caa49c895
330 changed files with 3555 additions and 4096 deletions
|
|
@ -61,33 +61,33 @@ class Blocklist 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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveSelectedPress = () => {
|
||||
this.setState({ isConfirmRemoveModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveSelectedConfirmed = () => {
|
||||
this.props.onRemoveSelected(this.getSelectedIds());
|
||||
this.setState({ isConfirmRemoveModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmRemoveModalClose = () => {
|
||||
this.setState({ isConfirmRemoveModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -68,37 +68,37 @@ class BlocklistConnector extends Component {
|
|||
|
||||
repopulate = () => {
|
||||
this.props.fetchBlocklist();
|
||||
}
|
||||
};
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onFirstPagePress = () => {
|
||||
this.props.gotoBlocklistFirstPage();
|
||||
}
|
||||
};
|
||||
|
||||
onPreviousPagePress = () => {
|
||||
this.props.gotoBlocklistPreviousPage();
|
||||
}
|
||||
};
|
||||
|
||||
onNextPagePress = () => {
|
||||
this.props.gotoBlocklistNextPage();
|
||||
}
|
||||
};
|
||||
|
||||
onLastPagePress = () => {
|
||||
this.props.gotoBlocklistLastPage();
|
||||
}
|
||||
};
|
||||
|
||||
onPageSelect = (page) => {
|
||||
this.props.gotoBlocklistPage({ page });
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveSelected = (ids) => {
|
||||
this.props.removeBlocklistItems({ ids });
|
||||
}
|
||||
};
|
||||
|
||||
onSortPress = (sortKey) => {
|
||||
this.props.setBlocklistSort({ sortKey });
|
||||
}
|
||||
};
|
||||
|
||||
onTableOptionChange = (payload) => {
|
||||
this.props.setBlocklistTableOption(payload);
|
||||
|
|
@ -106,11 +106,11 @@ class BlocklistConnector extends Component {
|
|||
if (payload.pageSize) {
|
||||
this.props.gotoBlocklistFirstPage();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onClearBlocklistPress = () => {
|
||||
this.props.executeCommand({ name: commandNames.CLEAR_BLOCKLIST });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ class BlocklistRow extends Component {
|
|||
|
||||
onDetailsPress = () => {
|
||||
this.setState({ isDetailsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDetailsModalClose = () => {
|
||||
this.setState({ isDetailsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -60,38 +60,38 @@ class HistoryConnector extends Component {
|
|||
|
||||
repopulate = () => {
|
||||
this.props.fetchHistory();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onFirstPagePress = () => {
|
||||
this.props.gotoHistoryFirstPage();
|
||||
}
|
||||
};
|
||||
|
||||
onPreviousPagePress = () => {
|
||||
this.props.gotoHistoryPreviousPage();
|
||||
}
|
||||
};
|
||||
|
||||
onNextPagePress = () => {
|
||||
this.props.gotoHistoryNextPage();
|
||||
}
|
||||
};
|
||||
|
||||
onLastPagePress = () => {
|
||||
this.props.gotoHistoryLastPage();
|
||||
}
|
||||
};
|
||||
|
||||
onPageSelect = (page) => {
|
||||
this.props.gotoHistoryPage({ page });
|
||||
}
|
||||
};
|
||||
|
||||
onSortPress = (sortKey) => {
|
||||
this.props.setHistorySort({ sortKey });
|
||||
}
|
||||
};
|
||||
|
||||
onFilterSelect = (selectedFilterKey) => {
|
||||
this.props.setHistoryFilter({ selectedFilterKey });
|
||||
}
|
||||
};
|
||||
|
||||
onTableOptionChange = (payload) => {
|
||||
this.props.setHistoryTableOption(payload);
|
||||
|
|
@ -99,7 +99,7 @@ class HistoryConnector extends Component {
|
|||
if (payload.pageSize) {
|
||||
this.props.gotoHistoryFirstPage();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ class HistoryRow extends Component {
|
|||
|
||||
onDetailsPress = () => {
|
||||
this.setState({ isDetailsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDetailsModalClose = () => {
|
||||
this.setState({ isDetailsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class HistoryRowConnector extends Component {
|
|||
|
||||
onMarkAsFailedPress = () => {
|
||||
this.props.markAsFailed({ id: this.props.id });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -100,45 +100,45 @@ class Queue extends Component {
|
|||
|
||||
getSelectedIds = () => {
|
||||
return getSelectedIds(this.state.selectedState);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onQueueRowModalOpenOrClose = (isOpen) => {
|
||||
this._shouldBlockRefresh = isOpen;
|
||||
}
|
||||
};
|
||||
|
||||
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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onGrabSelectedPress = () => {
|
||||
this.props.onGrabSelectedPress(this.getSelectedIds());
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveSelectedPress = () => {
|
||||
this.setState({ isConfirmRemoveModalOpen: true }, () => {
|
||||
this._shouldBlockRefresh = true;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveSelectedConfirmed = (payload) => {
|
||||
this._shouldBlockRefresh = false;
|
||||
this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload });
|
||||
this.setState({ isConfirmRemoveModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmRemoveModalClose = () => {
|
||||
this._shouldBlockRefresh = false;
|
||||
this.setState({ isConfirmRemoveModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -79,34 +79,34 @@ class QueueConnector extends Component {
|
|||
|
||||
repopulate = () => {
|
||||
this.props.fetchQueue();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onFirstPagePress = () => {
|
||||
this.props.gotoQueueFirstPage();
|
||||
}
|
||||
};
|
||||
|
||||
onPreviousPagePress = () => {
|
||||
this.props.gotoQueuePreviousPage();
|
||||
}
|
||||
};
|
||||
|
||||
onNextPagePress = () => {
|
||||
this.props.gotoQueueNextPage();
|
||||
}
|
||||
};
|
||||
|
||||
onLastPagePress = () => {
|
||||
this.props.gotoQueueLastPage();
|
||||
}
|
||||
};
|
||||
|
||||
onPageSelect = (page) => {
|
||||
this.props.gotoQueuePage({ page });
|
||||
}
|
||||
};
|
||||
|
||||
onSortPress = (sortKey) => {
|
||||
this.props.setQueueSort({ sortKey });
|
||||
}
|
||||
};
|
||||
|
||||
onTableOptionChange = (payload) => {
|
||||
this.props.setQueueTableOption(payload);
|
||||
|
|
@ -114,21 +114,21 @@ class QueueConnector extends Component {
|
|||
if (payload.pageSize) {
|
||||
this.props.gotoQueueFirstPage();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onRefreshPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.REFRESH_MONITORED_DOWNLOADS
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onGrabSelectedPress = (ids) => {
|
||||
this.props.grabQueueItems({ ids });
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveSelectedPress = (payload) => {
|
||||
this.props.removeQueueItems(payload);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class QueueOptions extends Component {
|
|||
[name]: value
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class QueueRow extends Component {
|
|||
|
||||
onRemoveQueueItemPress = () => {
|
||||
this.setState({ isRemoveQueueItemModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveQueueItemModalConfirmed = (blocklist, skipredownload) => {
|
||||
const {
|
||||
|
|
@ -53,25 +53,25 @@ class QueueRow extends Component {
|
|||
onRemoveQueueItemPress(blocklist, skipredownload);
|
||||
|
||||
this.setState({ isRemoveQueueItemModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveQueueItemModalClose = () => {
|
||||
this.props.onQueueRowModalOpenOrClose(false);
|
||||
|
||||
this.setState({ isRemoveQueueItemModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onInteractiveImportPress = () => {
|
||||
this.props.onQueueRowModalOpenOrClose(true);
|
||||
|
||||
this.setState({ isInteractiveImportModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onInteractiveImportModalClose = () => {
|
||||
this.props.onQueueRowModalOpenOrClose(false);
|
||||
|
||||
this.setState({ isInteractiveImportModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ class QueueRowConnector extends Component {
|
|||
|
||||
onGrabPress = () => {
|
||||
this.props.grabQueueItem({ id: this.props.id });
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveQueueItemPress = (payload) => {
|
||||
this.props.removeQueueItem({ id: this.props.id, ...payload });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -36,34 +36,34 @@ class RemoveQueueItemModal extends Component {
|
|||
blocklist: false,
|
||||
skipredownload: false
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onRemoveChange = ({ value }) => {
|
||||
this.setState({ remove: value });
|
||||
}
|
||||
};
|
||||
|
||||
onBlocklistChange = ({ value }) => {
|
||||
this.setState({ blocklist: value });
|
||||
}
|
||||
};
|
||||
|
||||
onSkipReDownloadChange = ({ value }) => {
|
||||
this.setState({ skipredownload: value });
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveConfirmed = () => {
|
||||
const state = this.state;
|
||||
|
||||
this.resetState();
|
||||
this.props.onRemovePress(state);
|
||||
}
|
||||
};
|
||||
|
||||
onModalClose = () => {
|
||||
this.resetState();
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -31,40 +31,40 @@ class RemoveQueueItemsModal extends Component {
|
|||
//
|
||||
// Control
|
||||
|
||||
resetState = function() {
|
||||
this.setState({
|
||||
remove: true,
|
||||
blocklist: false,
|
||||
skipredownload: false
|
||||
});
|
||||
}
|
||||
resetState = function() {
|
||||
this.setState({
|
||||
remove: true,
|
||||
blocklist: false,
|
||||
skipredownload: false
|
||||
});
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onRemoveChange = ({ value }) => {
|
||||
this.setState({ remove: value });
|
||||
}
|
||||
onRemoveChange = ({ value }) => {
|
||||
this.setState({ remove: value });
|
||||
};
|
||||
|
||||
onBlocklistChange = ({ value }) => {
|
||||
this.setState({ blocklist: value });
|
||||
}
|
||||
};
|
||||
|
||||
onSkipReDownloadChange = ({ value }) => {
|
||||
this.setState({ skipredownload: value });
|
||||
}
|
||||
};
|
||||
|
||||
onRemoveConfirmed = () => {
|
||||
const state = this.state;
|
||||
|
||||
this.resetState();
|
||||
this.props.onRemovePress(state);
|
||||
}
|
||||
};
|
||||
|
||||
onModalClose = () => {
|
||||
this.resetState();
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class AuthorImage extends Component {
|
|||
if (this.props.onError) {
|
||||
this.props.onError();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onLoad = () => {
|
||||
this.setState({
|
||||
|
|
@ -110,7 +110,7 @@ class AuthorImage extends Component {
|
|||
if (this.props.onLoad) {
|
||||
this.props.onLoad();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ class DeleteAuthorModalContent extends Component {
|
|||
|
||||
onDeleteFilesChange = ({ value }) => {
|
||||
this.setState({ deleteFiles: value });
|
||||
}
|
||||
};
|
||||
|
||||
onAddImportListExclusionChange = ({ value }) => {
|
||||
this.setState({ addImportListExclusion: value });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorConfirmed = () => {
|
||||
const deleteFiles = this.state.deleteFiles;
|
||||
|
|
@ -46,7 +46,7 @@ class DeleteAuthorModalContent extends Component {
|
|||
this.setState({ deleteFiles: false });
|
||||
this.setState({ addImportListExclusion: false });
|
||||
this.props.onDeletePress(deleteFiles, addImportListExclusion);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class DeleteAuthorModalContentConnector extends Component {
|
|||
});
|
||||
|
||||
this.props.onModalClose(true);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -99,69 +99,69 @@ class AuthorDetails extends Component {
|
|||
}
|
||||
|
||||
this.setState({ selectedState: newSelectedState, allSelected: isAllSelected, allUnselected: isAllUnselected });
|
||||
}
|
||||
};
|
||||
|
||||
getSelectedIds = () => {
|
||||
return getSelectedIds(this.state.selectedState);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onOrganizePress = () => {
|
||||
this.setState({ isOrganizeModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onOrganizeModalClose = () => {
|
||||
this.setState({ isOrganizeModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onRetagPress = () => {
|
||||
this.setState({ isRetagModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onRetagModalClose = () => {
|
||||
this.setState({ isRetagModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onInteractiveImportPress = () => {
|
||||
this.setState({ isInteractiveImportModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onInteractiveImportModalClose = () => {
|
||||
this.setState({ isInteractiveImportModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onMonitorOptionsPress = () => {
|
||||
this.setState({ isMonitorOptionsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onMonitorOptionsClose = () => {
|
||||
this.setState({ isMonitorOptionsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onBookEditorTogglePress = () => {
|
||||
this.setState({ isEditorActive: !this.state.isEditorActive });
|
||||
}
|
||||
};
|
||||
|
||||
onExpandAllPress = () => {
|
||||
const {
|
||||
|
|
@ -170,7 +170,7 @@ class AuthorDetails extends Component {
|
|||
} = this.state;
|
||||
|
||||
this.setState(getExpandedState(selectAll(expandedState, !allExpanded)));
|
||||
}
|
||||
};
|
||||
|
||||
onExpandPress = (bookId, isExpanded) => {
|
||||
this.setState((state) => {
|
||||
|
|
@ -184,32 +184,32 @@ class AuthorDetails extends Component {
|
|||
|
||||
return getExpandedState(newState);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAllChange = ({ value }) => {
|
||||
this.setState(selectAll(this.state.selectedState, value));
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAllPress = () => {
|
||||
this.onSelectAllChange({ value: !this.state.allSelected });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectedChange = (items, id, value, shiftKey = false) => {
|
||||
this.setState((state) => {
|
||||
return toggleSelected(state, items, id, value, shiftKey);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSaveSelected = (changes) => {
|
||||
this.props.onSaveSelected({
|
||||
bookIds: this.getSelectedIds(),
|
||||
...changes
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onTabSelect = (index, lastIndex) => {
|
||||
this.setState({ selectedTabIndex: index });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ class AuthorDetailsConnector extends Component {
|
|||
this.props.fetchSeries({ authorId });
|
||||
this.props.fetchBookFiles({ authorId });
|
||||
this.props.fetchQueueDetails({ authorId });
|
||||
}
|
||||
};
|
||||
|
||||
unpopulate = () => {
|
||||
this.props.cancelFetchReleases();
|
||||
|
|
@ -278,7 +278,7 @@ class AuthorDetailsConnector extends Component {
|
|||
this.props.clearBookFiles();
|
||||
this.props.clearQueueDetails();
|
||||
this.props.clearReleases();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
|
@ -288,25 +288,25 @@ class AuthorDetailsConnector extends Component {
|
|||
authorId: this.props.id,
|
||||
monitored
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onRefreshPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.REFRESH_AUTHOR,
|
||||
authorId: this.props.id
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSearchPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.AUTHOR_SEARCH,
|
||||
authorId: this.props.id
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSaveSelected = (payload) => {
|
||||
this.props.saveBookEditor(payload);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -52,11 +52,11 @@ class AuthorDetailsHeader extends Component {
|
|||
|
||||
onOverviewMeasure = ({ height }) => {
|
||||
this.setState({ overviewHeight: height });
|
||||
}
|
||||
};
|
||||
|
||||
onTitleMeasure = ({ width }) => {
|
||||
this.setState({ titleWidth: width });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class AuthorDetailsHeaderConnector extends Component {
|
|||
authorId: this.props.authorId,
|
||||
monitored
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class AuthorDetailsSeason extends Component {
|
|||
this.setState({ lastToggledBook: bookId });
|
||||
|
||||
this.props.onMonitorBookPress(_.uniq(bookIds), monitored);
|
||||
}
|
||||
};
|
||||
|
||||
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
||||
const {
|
||||
|
|
@ -70,7 +70,7 @@ class AuthorDetailsSeason extends Component {
|
|||
} = this.props;
|
||||
|
||||
return onSelectedChange(items, id, value, shiftKey);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -66,18 +66,18 @@ class AuthorDetailsSeasonConnector extends Component {
|
|||
|
||||
onTableOptionChange = (payload) => {
|
||||
this.props.setBooksTableOption(payload);
|
||||
}
|
||||
};
|
||||
|
||||
onSortPress = (sortKey) => {
|
||||
this.props.setAuthorDetailsSort({ sortKey });
|
||||
}
|
||||
};
|
||||
|
||||
onMonitorBookPress = (bookIds, monitored) => {
|
||||
this.props.toggleBooksMonitored({
|
||||
bookIds,
|
||||
monitored
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class AuthorDetailsSeries extends Component {
|
|||
} = this.props;
|
||||
|
||||
this.props.onExpandPress(id, !isExpanded);
|
||||
}
|
||||
};
|
||||
|
||||
onMonitorBookPress = (bookId, monitored, { shiftKey }) => {
|
||||
const lastToggled = this.state.lastToggledBook;
|
||||
|
|
@ -91,13 +91,13 @@ class AuthorDetailsSeries extends Component {
|
|||
this.setState({ lastToggledBook: bookId });
|
||||
|
||||
this.props.onMonitorBookPress(_.uniq(bookIds), monitored);
|
||||
}
|
||||
};
|
||||
|
||||
onMonitorSeriesPress = (monitored, { shiftKey }) => {
|
||||
const bookIds = this.props.items.map((book) => book.id);
|
||||
|
||||
this.props.onMonitorBookPress(_.uniq(bookIds), monitored);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -81,18 +81,18 @@ class AuthorDetailsSeasonConnector extends Component {
|
|||
|
||||
onTableOptionChange = (payload) => {
|
||||
this.props.setSeriesTableOption(payload);
|
||||
}
|
||||
};
|
||||
|
||||
onSortPress = (sortKey) => {
|
||||
this.props.dispatchSetSeriesSort({ sortKey });
|
||||
}
|
||||
};
|
||||
|
||||
onMonitorBookPress = (bookIds, monitored) => {
|
||||
this.props.toggleBooksMonitored({
|
||||
bookIds,
|
||||
monitored
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -30,23 +30,23 @@ class BookRow extends Component {
|
|||
|
||||
onManualSearchPress = () => {
|
||||
this.setState({ isDetailsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDetailsModalClose = () => {
|
||||
this.setState({ isDetailsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onEditBookPress = () => {
|
||||
this.setState({ isEditBookModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditBookModalClose = () => {
|
||||
this.setState({ isEditBookModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onMonitorBookPress = (monitored, options) => {
|
||||
this.props.onMonitorBookPress(this.props.id, monitored, options);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class EditAuthorModalConnector extends Component {
|
|||
onModalClose = () => {
|
||||
this.props.clearPendingChanges({ section: 'author' });
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ class EditAuthorModalContent extends Component {
|
|||
|
||||
onSavePress(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onMoveAuthorPress = () => {
|
||||
this.setState({ isConfirmMoveModalOpen: false });
|
||||
|
||||
this.props.onSavePress(true);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -83,14 +83,14 @@ class EditAuthorModalContentConnector extends Component {
|
|||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.props.dispatchSetAuthorValue({ name, value });
|
||||
}
|
||||
};
|
||||
|
||||
onSavePress = (moveFiles) => {
|
||||
this.props.dispatchSaveAuthor({
|
||||
id: this.props.authorId,
|
||||
moveFiles
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ class RetagAuthorModalContent extends Component {
|
|||
|
||||
onCheckInputChange = ({ name, value }) => {
|
||||
this.setState({ [name]: value });
|
||||
}
|
||||
};
|
||||
|
||||
onRetagAuthorPress = () => {
|
||||
this.props.onRetagAuthorPress(this.state.updateCovers, this.state.embedMetadata);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class RetagAuthorModalContentConnector extends Component {
|
|||
});
|
||||
|
||||
this.props.onModalClose(true);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class AuthorEditorFooter extends Component {
|
|||
default:
|
||||
this.props.onSaveSelected({ [name]: value });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onApplyTagsPress = (tags, applyTags) => {
|
||||
this.setState({
|
||||
|
|
@ -92,23 +92,23 @@ class AuthorEditorFooter extends Component {
|
|||
tags,
|
||||
applyTags
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteSelectedPress = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onTagsPress = () => {
|
||||
this.setState({ isTagsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onTagsModalClose = () => {
|
||||
this.setState({ isTagsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onSaveRootFolderPress = () => {
|
||||
this.setState({
|
||||
|
|
@ -117,7 +117,7 @@ class AuthorEditorFooter extends Component {
|
|||
});
|
||||
|
||||
this.props.onSaveSelected({ rootFolderPath: this.state.destinationRootFolder });
|
||||
}
|
||||
};
|
||||
|
||||
onMoveAuthorPress = () => {
|
||||
this.setState({
|
||||
|
|
@ -129,7 +129,7 @@ class AuthorEditorFooter extends Component {
|
|||
rootFolderPath: this.state.destinationRootFolder,
|
||||
moveFiles: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class AuthorEditorRow extends Component {
|
|||
onBookFolderChange = () => {
|
||||
// Mock handler to satisfy `onChange` being required for `CheckInput`.
|
||||
//
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ class DeleteAuthorModalContent extends Component {
|
|||
|
||||
onDeleteFilesChange = ({ value }) => {
|
||||
this.setState({ deleteFiles: value });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorConfirmed = () => {
|
||||
const deleteFiles = this.state.deleteFiles;
|
||||
|
||||
this.setState({ deleteFiles: false });
|
||||
this.props.onDeleteSelectedPress(deleteFiles);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class OrganizeAuthorModalContentConnector extends Component {
|
|||
});
|
||||
|
||||
this.props.onModalClose(true);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class TagsModalContent extends Component {
|
|||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.setState({ [name]: value });
|
||||
}
|
||||
};
|
||||
|
||||
onApplyTagsPress = () => {
|
||||
const {
|
||||
|
|
@ -43,7 +43,7 @@ class TagsModalContent extends Component {
|
|||
} = this.state;
|
||||
|
||||
this.props.onApplyTagsPress(tags, applyTags);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class AuthorHistoryContentConnector extends Component {
|
|||
authorId,
|
||||
bookId
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -55,16 +55,16 @@ class AuthorHistoryRow extends Component {
|
|||
|
||||
onMarkAsFailedPress = () => {
|
||||
this.setState({ isMarkAsFailedModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmMarkAsFailed = () => {
|
||||
this.props.onMarkAsFailedPress(this.props.id);
|
||||
this.setState({ isMarkAsFailedModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onMarkAsFailedModalClose = () => {
|
||||
this.setState({ isMarkAsFailedModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -99,14 +99,14 @@ class AuthorIndex extends Component {
|
|||
|
||||
setScrollerRef = (ref) => {
|
||||
this.setState({ scroller: ref });
|
||||
}
|
||||
};
|
||||
|
||||
getSelectedIds = () => {
|
||||
if (this.state.allUnselected) {
|
||||
return [];
|
||||
}
|
||||
return getSelectedIds(this.state.selectedState);
|
||||
}
|
||||
};
|
||||
|
||||
setSelectedState() {
|
||||
const {
|
||||
|
|
@ -192,19 +192,19 @@ class AuthorIndex extends Component {
|
|||
|
||||
onPosterOptionsPress = () => {
|
||||
this.setState({ isPosterOptionsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onPosterOptionsModalClose = () => {
|
||||
this.setState({ isPosterOptionsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onOverviewOptionsPress = () => {
|
||||
this.setState({ isOverviewOptionsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onOverviewOptionsModalClose = () => {
|
||||
this.setState({ isOverviewOptionsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onEditorTogglePress = () => {
|
||||
if (this.state.isEditorActive) {
|
||||
|
|
@ -214,36 +214,36 @@ class AuthorIndex extends Component {
|
|||
newState.isEditorActive = true;
|
||||
this.setState(newState);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onJumpBarItemPress = (jumpToCharacter) => {
|
||||
this.setState({ jumpToCharacter });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAllChange = ({ value }) => {
|
||||
this.setState(selectAll(this.state.selectedState, value));
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAllPress = () => {
|
||||
this.onSelectAllChange({ value: !this.state.allSelected });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
||||
this.setState((state) => {
|
||||
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSaveSelected = (changes) => {
|
||||
this.props.onSaveSelected({
|
||||
authorIds: this.getSelectedIds(),
|
||||
...changes
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onOrganizeAuthorPress = () => {
|
||||
this.setState({ isOrganizingAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onOrganizeAuthorModalClose = (organized) => {
|
||||
this.setState({ isOrganizingAuthorModalOpen: false });
|
||||
|
|
@ -251,11 +251,11 @@ class AuthorIndex extends Component {
|
|||
if (organized === true) {
|
||||
this.onSelectAllChange({ value: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onRetagAuthorPress = () => {
|
||||
this.setState({ isRetaggingAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onRetagAuthorModalClose = (organized) => {
|
||||
this.setState({ isRetaggingAuthorModalOpen: false });
|
||||
|
|
@ -263,14 +263,14 @@ class AuthorIndex extends Component {
|
|||
if (organized === true) {
|
||||
this.onSelectAllChange({ value: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onRefreshAuthorPress = () => {
|
||||
const selectedIds = this.getSelectedIds();
|
||||
const refreshIds = this.state.isEditorActive && selectedIds.length > 0 ? selectedIds : [];
|
||||
|
||||
this.props.onRefreshAuthorPress(refreshIds);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -85,15 +85,15 @@ class AuthorIndexConnector extends Component {
|
|||
|
||||
onViewSelect = (view) => {
|
||||
this.props.dispatchSetAuthorView(view);
|
||||
}
|
||||
};
|
||||
|
||||
onSaveSelected = (payload) => {
|
||||
this.props.dispatchSaveAuthorEditor(payload);
|
||||
}
|
||||
};
|
||||
|
||||
onScroll = ({ scrollTop }) => {
|
||||
scrollPositions.authorIndex = scrollTop;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -98,14 +98,14 @@ class AuthorIndexItemConnector extends Component {
|
|||
name: commandNames.REFRESH_AUTHOR,
|
||||
authorId: this.props.id
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSearchPress = () => {
|
||||
this.props.dispatchExecuteCommand({
|
||||
name: commandNames.AUTHOR_SEARCH,
|
||||
authorId: this.props.id
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -51,22 +51,22 @@ class AuthorIndexOverview extends Component {
|
|||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onChange = ({ value, shiftKey }) => {
|
||||
const {
|
||||
|
|
@ -75,7 +75,7 @@ class AuthorIndexOverview extends Component {
|
|||
} = this.props;
|
||||
|
||||
onSelectedChange({ id, value, shiftKey });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class AuthorIndexOverviews extends Component {
|
|||
|
||||
setGridRef = (ref) => {
|
||||
this._grid = ref;
|
||||
}
|
||||
};
|
||||
|
||||
calculateGrid = (width = this.state.width, isSmallScreen) => {
|
||||
const {
|
||||
|
|
@ -141,7 +141,7 @@ class AuthorIndexOverviews extends Component {
|
|||
posterHeight,
|
||||
rowHeight
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
cellRenderer = ({ key, rowIndex, style }) => {
|
||||
const {
|
||||
|
|
@ -197,14 +197,14 @@ class AuthorIndexOverviews extends Component {
|
|||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onMeasure = ({ width }) => {
|
||||
this.calculateGrid(width, this.props.isSmallScreen);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class AuthorIndexOverviewOptionsModalContent extends Component {
|
|||
}, () => {
|
||||
this.props.onChangeOverviewOption({ [name]: value });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -35,34 +35,34 @@ class AuthorIndexPoster extends Component {
|
|||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onPosterLoad = () => {
|
||||
if (this.state.hasPosterError) {
|
||||
this.setState({ hasPosterError: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onPosterLoadError = () => {
|
||||
if (!this.state.hasPosterError) {
|
||||
this.setState({ hasPosterError: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onChange = ({ value, shiftKey }) => {
|
||||
const {
|
||||
|
|
@ -71,7 +71,7 @@ class AuthorIndexPoster extends Component {
|
|||
} = this.props;
|
||||
|
||||
onSelectedChange({ id, value, shiftKey });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class AuthorIndexPosters extends Component {
|
|||
|
||||
setGridRef = (ref) => {
|
||||
this._grid = ref;
|
||||
}
|
||||
};
|
||||
|
||||
calculateGrid = (width = this.state.width, isSmallScreen) => {
|
||||
const {
|
||||
|
|
@ -193,7 +193,7 @@ class AuthorIndexPosters extends Component {
|
|||
posterHeight,
|
||||
rowHeight
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
cellRenderer = ({ key, rowIndex, columnIndex, style }) => {
|
||||
const {
|
||||
|
|
@ -259,14 +259,14 @@ class AuthorIndexPosters extends Component {
|
|||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onMeasure = ({ width }) => {
|
||||
this.calculateGrid(width, this.props.isSmallScreen);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class AuthorIndexPosterOptionsModalContent extends Component {
|
|||
}, () => {
|
||||
this.props.onChangePosterOption({ [name]: value });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -27,22 +27,22 @@ class AuthorIndexActionsCell extends Component {
|
|||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -40,39 +40,39 @@ class AuthorIndexRow extends Component {
|
|||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onUseSceneNumberingChange = () => {
|
||||
// Mock handler to satisfy `onChange` being required for `CheckInput`.
|
||||
//
|
||||
}
|
||||
};
|
||||
|
||||
onBannerLoad = () => {
|
||||
if (this.state.hasBannerError) {
|
||||
this.setState({ hasBannerError: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onBannerLoadError = () => {
|
||||
if (!this.state.hasBannerError) {
|
||||
this.setState({ hasBannerError: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class AuthorIndexTable extends Component {
|
|||
/>
|
||||
</VirtualTableRow>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class AuthorIndexTableOptions extends Component {
|
|||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class MonitoringOptionsModalConnector extends Component {
|
|||
onModalClose = () => {
|
||||
this.props.clearPendingChanges({ section: 'authors' });
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class MonitoringOptionsModalContent extends Component {
|
|||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.setState({ [name]: value });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
|
@ -65,11 +65,11 @@ class MonitoringOptionsModalContent extends Component {
|
|||
if (!isSaving) {
|
||||
this.onModalClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onModalClose = () => {
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -42,14 +42,14 @@ class MonitoringOptionsModalContentConnector extends Component {
|
|||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.setState({ name, value });
|
||||
}
|
||||
};
|
||||
|
||||
onSavePress = ({ monitor }) => {
|
||||
this.props.dispatchUpdateMonitoringOptions({
|
||||
id: this.props.authorId,
|
||||
monitor
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ class BookSearchCell extends Component {
|
|||
|
||||
onManualSearchPress = () => {
|
||||
this.setState({ isDetailsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDetailsModalClose = () => {
|
||||
this.setState({ isDetailsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ class DeleteBookModalContent extends Component {
|
|||
|
||||
onDeleteFilesChange = ({ value }) => {
|
||||
this.setState({ deleteFiles: value });
|
||||
}
|
||||
};
|
||||
|
||||
onAddImportListExclusionChange = ({ value }) => {
|
||||
this.setState({ addImportListExclusion: value });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteBookConfirmed = () => {
|
||||
const deleteFiles = this.state.deleteFiles;
|
||||
|
|
@ -45,7 +45,7 @@ class DeleteBookModalContent extends Component {
|
|||
this.setState({ deleteFiles: false });
|
||||
this.setState({ addImportListExclusion: false });
|
||||
this.props.onDeletePress(deleteFiles, addImportListExclusion);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class DeleteBookModalContentConnector extends Component {
|
|||
this.props.onModalClose(true);
|
||||
|
||||
this.props.push(`${window.Readarr.urlBase}/author/${this.props.authorSlug}`);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -45,42 +45,42 @@ class BookDetails extends Component {
|
|||
|
||||
onOrganizePress = () => {
|
||||
this.setState({ isOrganizeModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onOrganizeModalClose = () => {
|
||||
this.setState({ isOrganizeModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onRetagPress = () => {
|
||||
this.setState({ isRetagModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onRetagModalClose = () => {
|
||||
this.setState({ isRetagModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onEditBookPress = () => {
|
||||
this.setState({ isEditBookModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditBookModalClose = () => {
|
||||
this.setState({ isEditBookModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteBookPress = () => {
|
||||
this.setState({
|
||||
isEditBookModalOpen: false,
|
||||
isDeleteBookModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteBookModalClose = () => {
|
||||
this.setState({ isDeleteBookModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onTabSelect = (index, lastIndex) => {
|
||||
this.setState({ selectedTabIndex: index });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -146,14 +146,14 @@ class BookDetailsConnector extends Component {
|
|||
|
||||
this.props.fetchBookFiles({ bookId });
|
||||
this.props.fetchEditions({ bookId });
|
||||
}
|
||||
};
|
||||
|
||||
unpopulate = () => {
|
||||
this.props.cancelFetchReleases();
|
||||
this.props.clearReleases();
|
||||
this.props.clearBookFiles();
|
||||
this.props.clearEditions();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
|
@ -163,21 +163,21 @@ class BookDetailsConnector extends Component {
|
|||
bookIds: [this.props.id],
|
||||
monitored
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onRefreshPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.REFRESH_BOOK,
|
||||
bookId: this.props.id
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSearchPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.BOOK_SEARCH,
|
||||
bookIds: [this.props.id]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@ class BookDetailsHeader extends Component {
|
|||
|
||||
onOverviewMeasure = ({ height }) => {
|
||||
this.setState({ overviewHeight: height });
|
||||
}
|
||||
};
|
||||
|
||||
onTitleMeasure = ({ width }) => {
|
||||
this.setState({ titleWidth: width });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class BookDetailsHeaderConnector extends Component {
|
|||
bookIds: [this.props.bookId],
|
||||
monitored
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class BookDetailsPageConnector extends Component {
|
|||
|
||||
populate = () => {
|
||||
this.setState({ hasMounted: true });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class EditBookModalConnector extends Component {
|
|||
onModalClose = () => {
|
||||
this.props.clearPendingChanges({ section: 'books' });
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class EditBookModalContent extends Component {
|
|||
|
||||
onSavePress(false);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class EditBookModalContentConnector extends Component {
|
|||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.props.dispatchSetBookValue({ name, value });
|
||||
}
|
||||
};
|
||||
|
||||
onSavePress = () => {
|
||||
this.props.dispatchSaveBook({
|
||||
|
|
@ -85,7 +85,7 @@ class EditBookModalContentConnector extends Component {
|
|||
this.props.dispatchSaveEditions({
|
||||
id: this.props.bookId
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -62,15 +62,15 @@ class BookEditorFooter extends Component {
|
|||
default:
|
||||
this.props.onSaveSelected({ [name]: value });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteSelectedPress = () => {
|
||||
this.setState({ isDeleteBookModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteBookModalClose = () => {
|
||||
this.setState({ isDeleteBookModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -31,11 +31,11 @@ class DeleteBookModalContent extends Component {
|
|||
|
||||
onDeleteFilesChange = ({ value }) => {
|
||||
this.setState({ deleteFiles: value });
|
||||
}
|
||||
};
|
||||
|
||||
onAddImportListExclusionChange = ({ value }) => {
|
||||
this.setState({ addImportListExclusion: value });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteBookConfirmed = () => {
|
||||
const {
|
||||
|
|
@ -45,7 +45,7 @@ class DeleteBookModalContent extends Component {
|
|||
|
||||
this.setState({ deleteFiles: false });
|
||||
this.props.onDeleteSelectedPress(deleteFiles, addImportListExclusion);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -97,14 +97,14 @@ class BookIndex extends Component {
|
|||
|
||||
setScrollerRef = (ref) => {
|
||||
this.setState({ scroller: ref });
|
||||
}
|
||||
};
|
||||
|
||||
getSelectedIds = () => {
|
||||
if (this.state.allUnselected) {
|
||||
return [];
|
||||
}
|
||||
return getSelectedIds(this.state.selectedState);
|
||||
}
|
||||
};
|
||||
|
||||
setSelectedState() {
|
||||
const {
|
||||
|
|
@ -191,19 +191,19 @@ class BookIndex extends Component {
|
|||
|
||||
onPosterOptionsPress = () => {
|
||||
this.setState({ isPosterOptionsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onPosterOptionsModalClose = () => {
|
||||
this.setState({ isPosterOptionsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onOverviewOptionsPress = () => {
|
||||
this.setState({ isOverviewOptionsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onOverviewOptionsModalClose = () => {
|
||||
this.setState({ isOverviewOptionsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onEditorTogglePress = () => {
|
||||
if (this.state.isEditorActive) {
|
||||
|
|
@ -213,43 +213,43 @@ class BookIndex extends Component {
|
|||
newState.isEditorActive = true;
|
||||
this.setState(newState);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onJumpBarItemPress = (jumpToCharacter) => {
|
||||
this.setState({ jumpToCharacter });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAllChange = ({ value }) => {
|
||||
this.setState(selectAll(this.state.selectedState, value));
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAllPress = () => {
|
||||
this.onSelectAllChange({ value: !this.state.allSelected });
|
||||
}
|
||||
};
|
||||
|
||||
onSelectedChange = ({ id, value, shiftKey = false }) => {
|
||||
this.setState((state) => {
|
||||
return toggleSelected(state, this.props.items, id, value, shiftKey);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSaveSelected = (changes) => {
|
||||
this.props.onSaveSelected({
|
||||
bookIds: this.getSelectedIds(),
|
||||
...changes
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSearchPress = () => {
|
||||
this.setState({ isConfirmSearchModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onRefreshBookPress = () => {
|
||||
const selectedIds = this.getSelectedIds();
|
||||
const refreshIds = this.state.isEditorActive && selectedIds.length > 0 ? selectedIds : [];
|
||||
|
||||
this.props.onRefreshBookPress(refreshIds);
|
||||
}
|
||||
};
|
||||
|
||||
onSearchConfirmed = () => {
|
||||
const selectedMovieIds = this.getSelectedIds();
|
||||
|
|
@ -257,11 +257,11 @@ class BookIndex extends Component {
|
|||
|
||||
this.props.onSearchPress(searchIds);
|
||||
this.setState({ isConfirmSearchModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmSearchModalClose = () => {
|
||||
this.setState({ isConfirmSearchModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -94,15 +94,15 @@ class BookIndexConnector extends Component {
|
|||
|
||||
onViewSelect = (view) => {
|
||||
this.props.dispatchSetBookView(view);
|
||||
}
|
||||
};
|
||||
|
||||
onSaveSelected = (payload) => {
|
||||
this.props.dispatchSaveBookEditor(payload);
|
||||
}
|
||||
};
|
||||
|
||||
onScroll = ({ scrollTop }) => {
|
||||
scrollPositions.bookIndex = scrollTop;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -98,14 +98,14 @@ class BookIndexItemConnector extends Component {
|
|||
name: commandNames.REFRESH_BOOK,
|
||||
bookId: this.props.id
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSearchPress = () => {
|
||||
this.props.dispatchExecuteCommand({
|
||||
name: commandNames.BOOK_SEARCH,
|
||||
bookIds: [this.props.id]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -68,22 +68,22 @@ class BookIndexOverview extends Component {
|
|||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onChange = ({ value, shiftKey }) => {
|
||||
const {
|
||||
|
|
@ -92,7 +92,7 @@ class BookIndexOverview extends Component {
|
|||
} = this.props;
|
||||
|
||||
onSelectedChange({ id, value, shiftKey });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class BookIndexOverviews extends Component {
|
|||
|
||||
setGridRef = (ref) => {
|
||||
this._grid = ref;
|
||||
}
|
||||
};
|
||||
|
||||
calculateGrid = (width = this.state.width, isSmallScreen) => {
|
||||
const {
|
||||
|
|
@ -141,7 +141,7 @@ class BookIndexOverviews extends Component {
|
|||
posterHeight,
|
||||
rowHeight
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
cellRenderer = ({ key, rowIndex, style }) => {
|
||||
const {
|
||||
|
|
@ -196,14 +196,14 @@ class BookIndexOverviews extends Component {
|
|||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onMeasure = ({ width }) => {
|
||||
this.calculateGrid(width, this.props.isSmallScreen);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class BookIndexOverviewOptionsModalContent extends Component {
|
|||
}, () => {
|
||||
this.props.onChangeOverviewOption({ [name]: value });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -37,42 +37,42 @@ class BookIndexPoster extends Component {
|
|||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onEditBookPress = () => {
|
||||
this.setState({ isEditBookModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditBookModalClose = () => {
|
||||
this.setState({ isEditBookModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onPosterLoad = () => {
|
||||
if (this.state.hasPosterError) {
|
||||
this.setState({ hasPosterError: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onPosterLoadError = () => {
|
||||
if (!this.state.hasPosterError) {
|
||||
this.setState({ hasPosterError: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onChange = ({ value, shiftKey }) => {
|
||||
const {
|
||||
|
|
@ -81,7 +81,7 @@ class BookIndexPoster extends Component {
|
|||
} = this.props;
|
||||
|
||||
onSelectedChange({ id, value, shiftKey });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class BookIndexPosters extends Component {
|
|||
|
||||
setGridRef = (ref) => {
|
||||
this._grid = ref;
|
||||
}
|
||||
};
|
||||
|
||||
calculateGrid = (width = this.state.width, isSmallScreen) => {
|
||||
const {
|
||||
|
|
@ -197,7 +197,7 @@ class BookIndexPosters extends Component {
|
|||
posterHeight,
|
||||
rowHeight
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
cellRenderer = ({ key, rowIndex, columnIndex, style }) => {
|
||||
const {
|
||||
|
|
@ -264,14 +264,14 @@ class BookIndexPosters extends Component {
|
|||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onMeasure = ({ width }) => {
|
||||
this.calculateGrid(width, this.props.isSmallScreen);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class BookIndexPosterOptionsModalContent extends Component {
|
|||
}, () => {
|
||||
this.props.onChangePosterOption({ [name]: value });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -27,22 +27,22 @@ class BookIndexActionsCell extends Component {
|
|||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -37,47 +37,47 @@ class BookIndexRow extends Component {
|
|||
|
||||
onEditAuthorPress = () => {
|
||||
this.setState({ isEditAuthorModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditAuthorModalClose = () => {
|
||||
this.setState({ isEditAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorPress = () => {
|
||||
this.setState({
|
||||
isEditAuthorModalOpen: false,
|
||||
isDeleteAuthorModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteAuthorModalClose = () => {
|
||||
this.setState({ isDeleteAuthorModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onEditBookPress = () => {
|
||||
this.setState({ isEditBookModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditBookModalClose = () => {
|
||||
this.setState({ isEditBookModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onUseSceneNumberingChange = () => {
|
||||
// Mock handler to satisfy `onChange` being required for `CheckInput`.
|
||||
//
|
||||
}
|
||||
};
|
||||
|
||||
onBannerLoad = () => {
|
||||
if (this.state.hasBannerError) {
|
||||
this.setState({ hasBannerError: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onBannerLoadError = () => {
|
||||
if (!this.state.hasBannerError) {
|
||||
this.setState({ hasBannerError: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class BookIndexTable extends Component {
|
|||
/>
|
||||
</VirtualTableRow>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class BookIndexTableOptions extends Component {
|
|||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -27,24 +27,24 @@ class BookFileActionsCell extends Component {
|
|||
|
||||
onDetailsPress = () => {
|
||||
this.setState({ isDetailsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDetailsModalClose = () => {
|
||||
this.setState({ isDetailsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteFilePress = () => {
|
||||
this.setState({ isConfirmDeleteModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmDelete = () => {
|
||||
this.setState({ isConfirmDeleteModalOpen: false });
|
||||
this.props.deleteBookFile({ id: this.props.id });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmDeleteModalClose = () => {
|
||||
this.setState({ isConfirmDeleteModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -48,33 +48,33 @@ class BookFileEditorTableContent extends Component {
|
|||
getSelectedIds = () => {
|
||||
const ids = getSelectedIds(this.state.selectedState);
|
||||
return ids;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeletePress = () => {
|
||||
this.setState({ isConfirmDeleteModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmDelete = () => {
|
||||
this.setState({ isConfirmDeleteModalOpen: false });
|
||||
this.props.onDeletePress(this.getSelectedIds());
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmDeleteModalClose = () => {
|
||||
this.setState({ isConfirmDeleteModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onQualityChange = ({ value }) => {
|
||||
const selectedIds = this.getSelectedIds();
|
||||
|
|
@ -84,7 +84,7 @@ class BookFileEditorTableContent extends Component {
|
|||
}
|
||||
|
||||
this.props.onQualityChange(selectedIds, parseInt(value));
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class BookFileEditorTableContentConnector extends Component {
|
|||
};
|
||||
|
||||
this.props.dispatchUpdateBookFiles({ bookFileIds, quality });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class ExpandingFileDetails extends Component {
|
|||
isExpanded
|
||||
} = this.state;
|
||||
this.setState({ isExpanded: !isExpanded });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class Bookshelf extends Component {
|
|||
|
||||
setScrollerRef = (ref) => {
|
||||
this.setState({ scroller: ref });
|
||||
}
|
||||
};
|
||||
|
||||
setJumpBarItems() {
|
||||
const {
|
||||
|
|
@ -171,7 +171,7 @@ class Bookshelf extends Component {
|
|||
return [];
|
||||
}
|
||||
return getSelectedIds(this.state.selectedState);
|
||||
}
|
||||
};
|
||||
|
||||
setSelectedState = () => {
|
||||
const {
|
||||
|
|
@ -206,7 +206,7 @@ class Bookshelf extends Component {
|
|||
}
|
||||
|
||||
this.setState({ selectedState: newSelectedState, allSelected: isAllSelected, allUnselected: isAllUnselected });
|
||||
}
|
||||
};
|
||||
|
||||
estimateRowHeight = (width) => {
|
||||
const {
|
||||
|
|
@ -226,7 +226,7 @@ class Bookshelf extends Component {
|
|||
|
||||
// each row is 23px per book row plus 16px padding
|
||||
return bookRowsPerAuthor * 23 + 16;
|
||||
}
|
||||
};
|
||||
|
||||
rowRenderer = ({ key, rowIndex, parent, style }) => {
|
||||
const {
|
||||
|
|
@ -262,31 +262,31 @@ class Bookshelf extends Component {
|
|||
)}
|
||||
</CellMeasurer>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onSelectAllPress = () => {
|
||||
this.onSelectAllChange({ value: !this.state.allSelected });
|
||||
}
|
||||
};
|
||||
|
||||
onUpdateSelectedPress = (changes) => {
|
||||
this.props.onUpdateSelectedPress({
|
||||
authorIds: this.getSelectedIds(),
|
||||
...changes
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onJumpBarItemPress = (jumpToCharacter) => {
|
||||
const {
|
||||
|
|
@ -299,14 +299,14 @@ class Bookshelf extends Component {
|
|||
if (scrollIndex != null) {
|
||||
this.setState({ scrollIndex });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onGridRecompute = (width) => {
|
||||
this.setJumpBarItems();
|
||||
this.setSelectedState();
|
||||
this.setState({ estimatedRowSize: this.estimateRowHeight(width) });
|
||||
this.cache.clearAll();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class BookshelfBook extends Component {
|
|||
} = this.props;
|
||||
|
||||
this.props.onBookMonitoredPress(id, !monitored);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -55,15 +55,15 @@ class BookshelfConnector extends Component {
|
|||
|
||||
onSortPress = (sortKey) => {
|
||||
this.props.setBookshelfSort({ sortKey });
|
||||
}
|
||||
};
|
||||
|
||||
onFilterSelect = (selectedFilterKey) => {
|
||||
this.props.setBookshelfFilter({ selectedFilterKey });
|
||||
}
|
||||
};
|
||||
|
||||
onUpdateSelectedPress = (payload) => {
|
||||
this.props.saveBookshelf(payload);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class BookshelfFooter extends Component {
|
|||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.setState({ [name]: value });
|
||||
}
|
||||
};
|
||||
|
||||
onUpdateSelectedPress = () => {
|
||||
const {
|
||||
|
|
@ -70,7 +70,7 @@ class BookshelfFooter extends Component {
|
|||
}
|
||||
|
||||
this.props.onUpdateSelectedPress(changes);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class BookshelfRowConnector extends Component {
|
|||
authorId,
|
||||
monitored: !monitored
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onBookMonitoredPress = (bookId, monitored) => {
|
||||
const bookIds = [bookId];
|
||||
|
|
@ -68,7 +68,7 @@ class BookshelfRowConnector extends Component {
|
|||
bookIds,
|
||||
monitored
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ class AgendaEvent extends Component {
|
|||
|
||||
onPress = () => {
|
||||
this.setState({ isDetailsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onDetailsModalClose = () => {
|
||||
this.setState({ isDetailsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -100,43 +100,43 @@ class CalendarConnector extends Component {
|
|||
|
||||
this.props.fetchQueueDetails({ time, view });
|
||||
this.props.fetchCalendar({ time, view });
|
||||
}
|
||||
};
|
||||
|
||||
scheduleUpdate = () => {
|
||||
this.clearUpdateTimeout();
|
||||
|
||||
this.updateTimeoutId = setTimeout(this.updateCalendar, UPDATE_DELAY);
|
||||
}
|
||||
};
|
||||
|
||||
clearUpdateTimeout = () => {
|
||||
if (this.updateTimeoutId) {
|
||||
clearTimeout(this.updateTimeoutId);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
updateCalendar = () => {
|
||||
this.props.gotoCalendarToday();
|
||||
this.scheduleUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onCalendarViewChange = (view) => {
|
||||
this.props.setCalendarView({ view });
|
||||
}
|
||||
};
|
||||
|
||||
onTodayPress = () => {
|
||||
this.props.gotoCalendarToday();
|
||||
}
|
||||
};
|
||||
|
||||
onPreviousPress = () => {
|
||||
this.props.gotoCalendarPreviousRange();
|
||||
}
|
||||
};
|
||||
|
||||
onNextPress = () => {
|
||||
this.props.gotoCalendarNextRange();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -43,23 +43,23 @@ class CalendarPage extends Component {
|
|||
const days = Math.max(3, Math.min(7, Math.floor(width / MINIMUM_DAY_WIDTH)));
|
||||
|
||||
this.props.onDaysCountChange(days);
|
||||
}
|
||||
};
|
||||
|
||||
onGetCalendarLinkPress = () => {
|
||||
this.setState({ isCalendarLinkModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onGetCalendarLinkModalClose = () => {
|
||||
this.setState({ isCalendarLinkModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onOptionsPress = () => {
|
||||
this.setState({ isOptionsModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onOptionsModalClose = () => {
|
||||
this.setState({ isOptionsModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onSearchMissingPress = () => {
|
||||
const {
|
||||
|
|
@ -68,7 +68,7 @@ class CalendarPage extends Component {
|
|||
} = this.props;
|
||||
|
||||
onSearchMissingPress(missingBookIds);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -60,20 +60,20 @@ class CalendarDays extends Component {
|
|||
this.setState({ todaysDate: todaysDate.toISOString() });
|
||||
|
||||
this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff);
|
||||
}
|
||||
};
|
||||
|
||||
clearUpdateTimeout = () => {
|
||||
if (this.updateTimeoutId) {
|
||||
clearTimeout(this.updateTimeoutId);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onEventModalOpenToggle = (isEventModalOpen) => {
|
||||
this.setState({ isEventModalOpen });
|
||||
}
|
||||
};
|
||||
|
||||
onTouchStart = (event) => {
|
||||
const touches = event.touches;
|
||||
|
|
@ -92,7 +92,7 @@ class CalendarDays extends Component {
|
|||
}
|
||||
|
||||
this._touchStart = touchStart;
|
||||
}
|
||||
};
|
||||
|
||||
onTouchEnd = (event) => {
|
||||
const touches = event.changedTouches;
|
||||
|
|
@ -109,17 +109,17 @@ class CalendarDays extends Component {
|
|||
}
|
||||
|
||||
this._touchStart = null;
|
||||
}
|
||||
};
|
||||
|
||||
onTouchCancel = (event) => {
|
||||
this._touchStart = null;
|
||||
}
|
||||
};
|
||||
|
||||
onTouchMove = (event) => {
|
||||
if (!this._touchStart) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ class DaysOfWeek extends Component {
|
|||
});
|
||||
|
||||
this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff);
|
||||
}
|
||||
};
|
||||
|
||||
clearUpdateTimeout = () => {
|
||||
if (this.updateTimeoutId) {
|
||||
clearTimeout(this.updateTimeoutId);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ class CalendarEvent extends Component {
|
|||
this.setState({ isDetailsModalOpen: true }, () => {
|
||||
this.props.onEventModalOpenToggle(true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDetailsModalClose = () => {
|
||||
this.setState({ isDetailsModalOpen: false }, () => {
|
||||
this.props.onEventModalOpenToggle(false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class CalendarHeader extends Component {
|
|||
this.setState({ view }, () => {
|
||||
this.props.onViewChange(view);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -45,19 +45,19 @@ class CalendarHeaderConnector extends Component {
|
|||
|
||||
onViewChange = (view) => {
|
||||
this.props.setCalendarView({ view });
|
||||
}
|
||||
};
|
||||
|
||||
onTodayPress = () => {
|
||||
this.props.gotoCalendarToday();
|
||||
}
|
||||
};
|
||||
|
||||
onPreviousPress = () => {
|
||||
this.props.gotoCalendarPreviousRange();
|
||||
}
|
||||
};
|
||||
|
||||
onNextPress = () => {
|
||||
this.props.gotoCalendarNextRange();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class CalendarHeaderViewButton extends Component {
|
|||
|
||||
onPress = () => {
|
||||
this.props.onPress(this.props.view);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class CalendarOptionsModalContent extends Component {
|
|||
} = this.props;
|
||||
|
||||
dispatchSetCalendarOption({ [name]: value });
|
||||
}
|
||||
};
|
||||
|
||||
onGlobalInputChange = ({ name, value }) => {
|
||||
const {
|
||||
|
|
@ -81,11 +81,11 @@ class CalendarOptionsModalContent extends Component {
|
|||
this.setState(setting, () => {
|
||||
dispatchSaveUISettings(setting);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onLinkFocus = (event) => {
|
||||
event.target.select();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -82,11 +82,11 @@ class CalendarLinkModalContent extends Component {
|
|||
[name]: value,
|
||||
...urls
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onLinkFocus = (event) => {
|
||||
event.target.select();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
|
|
@ -70,18 +70,18 @@ class FileBrowserModalContent extends Component {
|
|||
} else {
|
||||
this._scrollerNode = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onPathInputChange = ({ value }) => {
|
||||
this.setState({ currentPath: value });
|
||||
}
|
||||
};
|
||||
|
||||
onRowPress = (path) => {
|
||||
this.props.onFetchPaths(path);
|
||||
}
|
||||
};
|
||||
|
||||
onOkPress = () => {
|
||||
this.props.onChange({
|
||||
|
|
@ -91,7 +91,7 @@ class FileBrowserModalContent extends Component {
|
|||
|
||||
this.props.onClearPaths();
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue