Compare commits

..

1 Commits

Author SHA1 Message Date
Colin Gagnaire
925569a17b New: Add support for native Freebox Download Client
(cherry picked from commit fb76c237bfbb8aa43bcdd9ce34d90ea843011cee)
2022-12-17 02:40:51 +00:00
634 changed files with 6138 additions and 7377 deletions

View File

@@ -62,15 +62,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
[![Mega Sponsors List](https://opencollective.com/Readarr/tiers/mega-sponsor.svg?width=890)](https://opencollective.com/readarr#mega-sponsor) [![Mega Sponsors List](https://opencollective.com/Readarr/tiers/mega-sponsor.svg?width=890)](https://opencollective.com/readarr#mega-sponsor)
## DigitalOcean
This project is also supported by DigitalOcean
<p>
<a href="https://www.digitalocean.com/">
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="201px">
</a>
</p>
### License ### License
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html) * [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)

View File

@@ -9,7 +9,7 @@ variables:
testsFolder: './_tests' testsFolder: './_tests'
yarnCacheFolder: $(Pipeline.Workspace)/.yarn yarnCacheFolder: $(Pipeline.Workspace)/.yarn
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
majorVersion: '0.1.2' majorVersion: '0.1.1'
minorVersion: $[counter('minorVersion', 1)] minorVersion: $[counter('minorVersion', 1)]
readarrVersion: '$(majorVersion).$(minorVersion)' readarrVersion: '$(majorVersion).$(minorVersion)'
buildName: '$(Build.SourceBranchName).$(readarrVersion)' buildName: '$(Build.SourceBranchName).$(readarrVersion)'

View File

@@ -1,6 +1,7 @@
const reload = require('require-nocache')(module); const reload = require('require-nocache')(module);
const cssVarsFiles = [ const cssVarsFiles = [
'./src/Styles/Variables/colors',
'./src/Styles/Variables/dimensions', './src/Styles/Variables/dimensions',
'./src/Styles/Variables/fonts', './src/Styles/Variables/fonts',
'./src/Styles/Variables/animations', './src/Styles/Variables/animations',

View File

@@ -61,33 +61,33 @@ class Blocklist extends Component {
getSelectedIds = () => { getSelectedIds = () => {
return getSelectedIds(this.state.selectedState); return getSelectedIds(this.state.selectedState);
}; }
// //
// Listeners // Listeners
onSelectAllChange = ({ value }) => { onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value)); this.setState(selectAll(this.state.selectedState, value));
}; }
onSelectedChange = ({ id, value, shiftKey = false }) => { onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => { this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey); return toggleSelected(state, this.props.items, id, value, shiftKey);
}); });
}; }
onRemoveSelectedPress = () => { onRemoveSelectedPress = () => {
this.setState({ isConfirmRemoveModalOpen: true }); this.setState({ isConfirmRemoveModalOpen: true });
}; }
onRemoveSelectedConfirmed = () => { onRemoveSelectedConfirmed = () => {
this.props.onRemoveSelected(this.getSelectedIds()); this.props.onRemoveSelected(this.getSelectedIds());
this.setState({ isConfirmRemoveModalOpen: false }); this.setState({ isConfirmRemoveModalOpen: false });
}; }
onConfirmRemoveModalClose = () => { onConfirmRemoveModalClose = () => {
this.setState({ isConfirmRemoveModalOpen: false }); this.setState({ isConfirmRemoveModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -68,37 +68,37 @@ class BlocklistConnector extends Component {
repopulate = () => { repopulate = () => {
this.props.fetchBlocklist(); this.props.fetchBlocklist();
}; }
// //
// Listeners // Listeners
onFirstPagePress = () => { onFirstPagePress = () => {
this.props.gotoBlocklistFirstPage(); this.props.gotoBlocklistFirstPage();
}; }
onPreviousPagePress = () => { onPreviousPagePress = () => {
this.props.gotoBlocklistPreviousPage(); this.props.gotoBlocklistPreviousPage();
}; }
onNextPagePress = () => { onNextPagePress = () => {
this.props.gotoBlocklistNextPage(); this.props.gotoBlocklistNextPage();
}; }
onLastPagePress = () => { onLastPagePress = () => {
this.props.gotoBlocklistLastPage(); this.props.gotoBlocklistLastPage();
}; }
onPageSelect = (page) => { onPageSelect = (page) => {
this.props.gotoBlocklistPage({ page }); this.props.gotoBlocklistPage({ page });
}; }
onRemoveSelected = (ids) => { onRemoveSelected = (ids) => {
this.props.removeBlocklistItems({ ids }); this.props.removeBlocklistItems({ ids });
}; }
onSortPress = (sortKey) => { onSortPress = (sortKey) => {
this.props.setBlocklistSort({ sortKey }); this.props.setBlocklistSort({ sortKey });
}; }
onTableOptionChange = (payload) => { onTableOptionChange = (payload) => {
this.props.setBlocklistTableOption(payload); this.props.setBlocklistTableOption(payload);
@@ -106,11 +106,11 @@ class BlocklistConnector extends Component {
if (payload.pageSize) { if (payload.pageSize) {
this.props.gotoBlocklistFirstPage(); this.props.gotoBlocklistFirstPage();
} }
}; }
onClearBlocklistPress = () => { onClearBlocklistPress = () => {
this.props.executeCommand({ name: commandNames.CLEAR_BLOCKLIST }); this.props.executeCommand({ name: commandNames.CLEAR_BLOCKLIST });
}; }
// //
// Render // Render

View File

@@ -30,11 +30,11 @@ class BlocklistRow extends Component {
onDetailsPress = () => { onDetailsPress = () => {
this.setState({ isDetailsModalOpen: true }); this.setState({ isDetailsModalOpen: true });
}; }
onDetailsModalClose = () => { onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false }); this.setState({ isDetailsModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -60,38 +60,38 @@ class HistoryConnector extends Component {
repopulate = () => { repopulate = () => {
this.props.fetchHistory(); this.props.fetchHistory();
}; }
// //
// Listeners // Listeners
onFirstPagePress = () => { onFirstPagePress = () => {
this.props.gotoHistoryFirstPage(); this.props.gotoHistoryFirstPage();
}; }
onPreviousPagePress = () => { onPreviousPagePress = () => {
this.props.gotoHistoryPreviousPage(); this.props.gotoHistoryPreviousPage();
}; }
onNextPagePress = () => { onNextPagePress = () => {
this.props.gotoHistoryNextPage(); this.props.gotoHistoryNextPage();
}; }
onLastPagePress = () => { onLastPagePress = () => {
this.props.gotoHistoryLastPage(); this.props.gotoHistoryLastPage();
}; }
onPageSelect = (page) => { onPageSelect = (page) => {
this.props.gotoHistoryPage({ page }); this.props.gotoHistoryPage({ page });
}; }
onSortPress = (sortKey) => { onSortPress = (sortKey) => {
this.props.setHistorySort({ sortKey }); this.props.setHistorySort({ sortKey });
}; }
onFilterSelect = (selectedFilterKey) => { onFilterSelect = (selectedFilterKey) => {
this.props.setHistoryFilter({ selectedFilterKey }); this.props.setHistoryFilter({ selectedFilterKey });
}; }
onTableOptionChange = (payload) => { onTableOptionChange = (payload) => {
this.props.setHistoryTableOption(payload); this.props.setHistoryTableOption(payload);
@@ -99,7 +99,7 @@ class HistoryConnector extends Component {
if (payload.pageSize) { if (payload.pageSize) {
this.props.gotoHistoryFirstPage(); this.props.gotoHistoryFirstPage();
} }
}; }
// //
// Render // Render

View File

@@ -40,11 +40,11 @@ class HistoryRow extends Component {
onDetailsPress = () => { onDetailsPress = () => {
this.setState({ isDetailsModalOpen: true }); this.setState({ isDetailsModalOpen: true });
}; }
onDetailsModalClose = () => { onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false }); this.setState({ isDetailsModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -49,7 +49,7 @@ class HistoryRowConnector extends Component {
onMarkAsFailedPress = () => { onMarkAsFailedPress = () => {
this.props.markAsFailed({ id: this.props.id }); this.props.markAsFailed({ id: this.props.id });
}; }
// //
// Render // Render

View File

@@ -1,13 +1,13 @@
.torrent { .torrent {
composes: label from '~Components/Label.css'; composes: label from '~Components/Label.css';
border-color: var(--torrentColor); border-color: $torrentColor;
background-color: var(--torrentColor); background-color: $torrentColor;
} }
.usenet { .usenet {
composes: label from '~Components/Label.css'; composes: label from '~Components/Label.css';
border-color: var(--usenetColor); border-color: $usenetColor;
background-color: var(--usenetColor); background-color: $usenetColor;
} }

View File

@@ -75,23 +75,13 @@ class Queue extends Component {
return; return;
} }
const nextState = {};
if (prevProps.items !== items) {
nextState.items = items;
}
const selectedIds = this.getSelectedIds(); const selectedIds = this.getSelectedIds();
const isPendingSelected = _.some(this.props.items, (item) => { const isPendingSelected = _.some(this.props.items, (item) => {
return selectedIds.indexOf(item.id) > -1 && item.status === 'delay'; return selectedIds.indexOf(item.id) > -1 && item.status === 'delay';
}); });
if (isPendingSelected !== this.state.isPendingSelected) { if (isPendingSelected !== this.state.isPendingSelected) {
nextState.isPendingSelected = isPendingSelected; this.setState({ isPendingSelected });
}
if (!_.isEmpty(nextState)) {
this.setState(nextState);
} }
} }
@@ -100,45 +90,45 @@ class Queue extends Component {
getSelectedIds = () => { getSelectedIds = () => {
return getSelectedIds(this.state.selectedState); return getSelectedIds(this.state.selectedState);
}; }
// //
// Listeners // Listeners
onQueueRowModalOpenOrClose = (isOpen) => { onQueueRowModalOpenOrClose = (isOpen) => {
this._shouldBlockRefresh = isOpen; this._shouldBlockRefresh = isOpen;
}; }
onSelectAllChange = ({ value }) => { onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value)); this.setState(selectAll(this.state.selectedState, value));
}; }
onSelectedChange = ({ id, value, shiftKey = false }) => { onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => { this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey); return toggleSelected(state, this.props.items, id, value, shiftKey);
}); });
}; }
onGrabSelectedPress = () => { onGrabSelectedPress = () => {
this.props.onGrabSelectedPress(this.getSelectedIds()); this.props.onGrabSelectedPress(this.getSelectedIds());
}; }
onRemoveSelectedPress = () => { onRemoveSelectedPress = () => {
this.setState({ isConfirmRemoveModalOpen: true }, () => { this.setState({ isConfirmRemoveModalOpen: true }, () => {
this._shouldBlockRefresh = true; this._shouldBlockRefresh = true;
}); });
}; }
onRemoveSelectedConfirmed = (payload) => { onRemoveSelectedConfirmed = (payload) => {
this._shouldBlockRefresh = false; this._shouldBlockRefresh = false;
this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload }); this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload });
this.setState({ isConfirmRemoveModalOpen: false }); this.setState({ isConfirmRemoveModalOpen: false });
}; }
onConfirmRemoveModalClose = () => { onConfirmRemoveModalClose = () => {
this._shouldBlockRefresh = false; this._shouldBlockRefresh = false;
this.setState({ isConfirmRemoveModalOpen: false }); this.setState({ isConfirmRemoveModalOpen: false });
}; }
// //
// Render // Render
@@ -226,29 +216,26 @@ class Queue extends Component {
<PageContentBody> <PageContentBody>
{ {
isRefreshing && !isAllPopulated ? isRefreshing && !isAllPopulated &&
<LoadingIndicator /> : <LoadingIndicator />
null
} }
{ {
!isRefreshing && hasError ? !isRefreshing && hasError &&
<div> <div>
{translate('FailedToLoadQueue')} {translate('FailedToLoadQueue')}
</div> : </div>
null
} }
{ {
isAllPopulated && !hasError && !items.length ? isAllPopulated && !hasError && !items.length &&
<div> <div>
{translate('QueueIsEmpty')} {translate('QueueIsEmpty')}
</div> : </div>
null
} }
{ {
isAllPopulated && !hasError && !!items.length ? isAllPopulated && !hasError && !!items.length &&
<div> <div>
<Table <Table
columns={columns} columns={columns}
@@ -283,8 +270,7 @@ class Queue extends Component {
isFetching={isRefreshing} isFetching={isRefreshing}
{...otherProps} {...otherProps}
/> />
</div> : </div>
null
} }
</PageContentBody> </PageContentBody>

View File

@@ -79,34 +79,34 @@ class QueueConnector extends Component {
repopulate = () => { repopulate = () => {
this.props.fetchQueue(); this.props.fetchQueue();
}; }
// //
// Listeners // Listeners
onFirstPagePress = () => { onFirstPagePress = () => {
this.props.gotoQueueFirstPage(); this.props.gotoQueueFirstPage();
}; }
onPreviousPagePress = () => { onPreviousPagePress = () => {
this.props.gotoQueuePreviousPage(); this.props.gotoQueuePreviousPage();
}; }
onNextPagePress = () => { onNextPagePress = () => {
this.props.gotoQueueNextPage(); this.props.gotoQueueNextPage();
}; }
onLastPagePress = () => { onLastPagePress = () => {
this.props.gotoQueueLastPage(); this.props.gotoQueueLastPage();
}; }
onPageSelect = (page) => { onPageSelect = (page) => {
this.props.gotoQueuePage({ page }); this.props.gotoQueuePage({ page });
}; }
onSortPress = (sortKey) => { onSortPress = (sortKey) => {
this.props.setQueueSort({ sortKey }); this.props.setQueueSort({ sortKey });
}; }
onTableOptionChange = (payload) => { onTableOptionChange = (payload) => {
this.props.setQueueTableOption(payload); this.props.setQueueTableOption(payload);
@@ -114,21 +114,21 @@ class QueueConnector extends Component {
if (payload.pageSize) { if (payload.pageSize) {
this.props.gotoQueueFirstPage(); this.props.gotoQueueFirstPage();
} }
}; }
onRefreshPress = () => { onRefreshPress = () => {
this.props.executeCommand({ this.props.executeCommand({
name: commandNames.REFRESH_MONITORED_DOWNLOADS name: commandNames.REFRESH_MONITORED_DOWNLOADS
}); });
}; }
onGrabSelectedPress = (ids) => { onGrabSelectedPress = (ids) => {
this.props.grabQueueItems({ ids }); this.props.grabQueueItems({ ids });
}; }
onRemoveSelectedPress = (payload) => { onRemoveSelectedPress = (payload) => {
this.props.removeQueueItems(payload); this.props.removeQueueItems(payload);
}; }
// //
// Render // Render

View File

@@ -42,7 +42,7 @@ class QueueOptions extends Component {
[name]: value [name]: value
}); });
}); });
}; }
// //
// Render // Render

View File

@@ -41,7 +41,7 @@ class QueueRow extends Component {
onRemoveQueueItemPress = () => { onRemoveQueueItemPress = () => {
this.setState({ isRemoveQueueItemModalOpen: true }); this.setState({ isRemoveQueueItemModalOpen: true });
}; }
onRemoveQueueItemModalConfirmed = (blocklist, skipredownload) => { onRemoveQueueItemModalConfirmed = (blocklist, skipredownload) => {
const { const {
@@ -53,25 +53,25 @@ class QueueRow extends Component {
onRemoveQueueItemPress(blocklist, skipredownload); onRemoveQueueItemPress(blocklist, skipredownload);
this.setState({ isRemoveQueueItemModalOpen: false }); this.setState({ isRemoveQueueItemModalOpen: false });
}; }
onRemoveQueueItemModalClose = () => { onRemoveQueueItemModalClose = () => {
this.props.onQueueRowModalOpenOrClose(false); this.props.onQueueRowModalOpenOrClose(false);
this.setState({ isRemoveQueueItemModalOpen: false }); this.setState({ isRemoveQueueItemModalOpen: false });
}; }
onInteractiveImportPress = () => { onInteractiveImportPress = () => {
this.props.onQueueRowModalOpenOrClose(true); this.props.onQueueRowModalOpenOrClose(true);
this.setState({ isInteractiveImportModalOpen: true }); this.setState({ isInteractiveImportModalOpen: true });
}; }
onInteractiveImportModalClose = () => { onInteractiveImportModalClose = () => {
this.props.onQueueRowModalOpenOrClose(false); this.props.onQueueRowModalOpenOrClose(false);
this.setState({ isInteractiveImportModalOpen: false }); this.setState({ isInteractiveImportModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -41,11 +41,11 @@ class QueueRowConnector extends Component {
onGrabPress = () => { onGrabPress = () => {
this.props.grabQueueItem({ id: this.props.id }); this.props.grabQueueItem({ id: this.props.id });
}; }
onRemoveQueueItemPress = (payload) => { onRemoveQueueItemPress = (payload) => {
this.props.removeQueueItem({ id: this.props.id, ...payload }); this.props.removeQueueItem({ id: this.props.id, ...payload });
}; }
// //
// Render // Render

View File

@@ -36,34 +36,34 @@ class RemoveQueueItemModal extends Component {
blocklist: false, blocklist: false,
skipredownload: false skipredownload: false
}); });
}; }
// //
// Listeners // Listeners
onRemoveChange = ({ value }) => { onRemoveChange = ({ value }) => {
this.setState({ remove: value }); this.setState({ remove: value });
}; }
onBlocklistChange = ({ value }) => { onBlocklistChange = ({ value }) => {
this.setState({ blocklist: value }); this.setState({ blocklist: value });
}; }
onSkipReDownloadChange = ({ value }) => { onSkipReDownloadChange = ({ value }) => {
this.setState({ skipredownload: value }); this.setState({ skipredownload: value });
}; }
onRemoveConfirmed = () => { onRemoveConfirmed = () => {
const state = this.state; const state = this.state;
this.resetState(); this.resetState();
this.props.onRemovePress(state); this.props.onRemovePress(state);
}; }
onModalClose = () => { onModalClose = () => {
this.resetState(); this.resetState();
this.props.onModalClose(); this.props.onModalClose();
}; }
// //
// Render // Render

View File

@@ -31,40 +31,40 @@ class RemoveQueueItemsModal extends Component {
// //
// Control // Control
resetState = function() { resetState = function() {
this.setState({ this.setState({
remove: true, remove: true,
blocklist: false, blocklist: false,
skipredownload: false skipredownload: false
}); });
}; }
// //
// Listeners // Listeners
onRemoveChange = ({ value }) => { onRemoveChange = ({ value }) => {
this.setState({ remove: value }); this.setState({ remove: value });
}; }
onBlocklistChange = ({ value }) => { onBlocklistChange = ({ value }) => {
this.setState({ blocklist: value }); this.setState({ blocklist: value });
}; }
onSkipReDownloadChange = ({ value }) => { onSkipReDownloadChange = ({ value }) => {
this.setState({ skipredownload: value }); this.setState({ skipredownload: value });
}; }
onRemoveConfirmed = () => { onRemoveConfirmed = () => {
const state = this.state; const state = this.state;
this.resetState(); this.resetState();
this.props.onRemovePress(state); this.props.onRemovePress(state);
}; }
onModalClose = () => { onModalClose = () => {
this.resetState(); this.resetState();
this.props.onModalClose(); this.props.onModalClose();
}; }
// //
// Render // Render

View File

@@ -4,7 +4,6 @@ import React from 'react';
import DocumentTitle from 'react-document-title'; import DocumentTitle from 'react-document-title';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import PageConnector from 'Components/Page/PageConnector'; import PageConnector from 'Components/Page/PageConnector';
import ApplyTheme from './ApplyTheme';
import AppRoutes from './AppRoutes'; import AppRoutes from './AppRoutes';
function App({ store, history }) { function App({ store, history }) {
@@ -12,11 +11,9 @@ function App({ store, history }) {
<DocumentTitle title={window.Readarr.instanceName}> <DocumentTitle title={window.Readarr.instanceName}>
<Provider store={store}> <Provider store={store}>
<ConnectedRouter history={history}> <ConnectedRouter history={history}>
<ApplyTheme> <PageConnector>
<PageConnector> <AppRoutes app={App} />
<AppRoutes app={App} /> </PageConnector>
</PageConnector>
</ApplyTheme>
</ConnectedRouter> </ConnectedRouter>
</Provider> </Provider>
</DocumentTitle> </DocumentTitle>

View File

@@ -22,7 +22,7 @@ import MediaManagementConnector from 'Settings/MediaManagement/MediaManagementCo
import MetadataSettings from 'Settings/Metadata/MetadataSettings'; import MetadataSettings from 'Settings/Metadata/MetadataSettings';
import NotificationSettings from 'Settings/Notifications/NotificationSettings'; import NotificationSettings from 'Settings/Notifications/NotificationSettings';
import Profiles from 'Settings/Profiles/Profiles'; import Profiles from 'Settings/Profiles/Profiles';
import QualityConnector from 'Settings/Quality/QualityConnector'; import Quality from 'Settings/Quality/Quality';
import Settings from 'Settings/Settings'; import Settings from 'Settings/Settings';
import TagSettings from 'Settings/Tags/TagSettings'; import TagSettings from 'Settings/Tags/TagSettings';
import UISettingsConnector from 'Settings/UI/UISettingsConnector'; import UISettingsConnector from 'Settings/UI/UISettingsConnector';
@@ -172,7 +172,7 @@ function AppRoutes(props) {
<Route <Route
path="/settings/quality" path="/settings/quality"
component={QualityConnector} component={Quality}
/> />
<Route <Route

View File

@@ -11,47 +11,9 @@ import UpdateChanges from 'System/Updates/UpdateChanges';
import translate from 'Utilities/String/translate'; import translate from 'Utilities/String/translate';
import styles from './AppUpdatedModalContent.css'; import styles from './AppUpdatedModalContent.css';
function mergeUpdates(items, version, prevVersion) {
let installedIndex = items.findIndex((u) => u.version === version);
let installedPreviouslyIndex = items.findIndex((u) => u.version === prevVersion);
if (installedIndex === -1) {
installedIndex = 0;
}
if (installedPreviouslyIndex === -1) {
installedPreviouslyIndex = items.length;
} else if (installedPreviouslyIndex === installedIndex && items.length) {
installedPreviouslyIndex += 1;
}
const appliedUpdates = items.slice(installedIndex, installedPreviouslyIndex);
if (!appliedUpdates.length) {
return null;
}
const appliedChanges = { new: [], fixed: [] };
appliedUpdates.forEach((u) => {
if (u.changes) {
appliedChanges.new.push(... u.changes.new);
appliedChanges.fixed.push(... u.changes.fixed);
}
});
const mergedUpdate = Object.assign({}, appliedUpdates[0], { changes: appliedChanges });
if (!appliedChanges.new.length && !appliedChanges.fixed.length) {
mergedUpdate.changes = null;
}
return mergedUpdate;
}
function AppUpdatedModalContent(props) { function AppUpdatedModalContent(props) {
const { const {
version, version,
prevVersion,
isPopulated, isPopulated,
error, error,
items, items,
@@ -59,7 +21,7 @@ function AppUpdatedModalContent(props) {
onModalClose onModalClose
} = props; } = props;
const update = mergeUpdates(items, version, prevVersion); const update = items[0];
return ( return (
<ModalContent onModalClose={onModalClose}> <ModalContent onModalClose={onModalClose}>
@@ -129,7 +91,6 @@ function AppUpdatedModalContent(props) {
AppUpdatedModalContent.propTypes = { AppUpdatedModalContent.propTypes = {
version: PropTypes.string.isRequired, version: PropTypes.string.isRequired,
prevVersion: PropTypes.string,
isPopulated: PropTypes.bool.isRequired, isPopulated: PropTypes.bool.isRequired,
error: PropTypes.object, error: PropTypes.object,
items: PropTypes.arrayOf(PropTypes.object).isRequired, items: PropTypes.arrayOf(PropTypes.object).isRequired,

View File

@@ -8,9 +8,8 @@ import AppUpdatedModalContent from './AppUpdatedModalContent';
function createMapStateToProps() { function createMapStateToProps() {
return createSelector( return createSelector(
(state) => state.app.version, (state) => state.app.version,
(state) => state.app.prevVersion,
(state) => state.system.updates, (state) => state.system.updates,
(version, prevVersion, updates) => { (version, updates) => {
const { const {
isPopulated, isPopulated,
error, error,
@@ -19,7 +18,6 @@ function createMapStateToProps() {
return { return {
version, version,
prevVersion,
isPopulated, isPopulated,
error, error,
items items

View File

@@ -1,49 +0,0 @@
import PropTypes from 'prop-types';
import React, { Fragment, useCallback, useEffect } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import themes from 'Styles/Themes';
function createMapStateToProps() {
return createSelector(
(state) => state.settings.ui.item.theme || window.Readarr.theme,
(
theme
) => {
return {
theme
};
}
);
}
function ApplyTheme({ theme, children }) {
// Update the CSS Variables
const updateCSSVariables = useCallback(() => {
const arrayOfVariableKeys = Object.keys(themes[theme]);
const arrayOfVariableValues = Object.values(themes[theme]);
// Loop through each array key and set the CSS Variables
arrayOfVariableKeys.forEach((cssVariableKey, index) => {
// Based on our snippet from MDN
document.documentElement.style.setProperty(
`--${cssVariableKey}`,
arrayOfVariableValues[index]
);
});
}, [theme]);
// On Component Mount and Component Update
useEffect(() => {
updateCSSVariables(theme);
}, [updateCSSVariables, theme]);
return <Fragment>{children}</Fragment>;
}
ApplyTheme.propTypes = {
theme: PropTypes.string.isRequired,
children: PropTypes.object.isRequired
};
export default connect(createMapStateToProps)(ApplyTheme);

View File

@@ -99,7 +99,7 @@ class AuthorImage extends Component {
if (this.props.onError) { if (this.props.onError) {
this.props.onError(); this.props.onError();
} }
}; }
onLoad = () => { onLoad = () => {
this.setState({ this.setState({
@@ -110,7 +110,7 @@ class AuthorImage extends Component {
if (this.props.onLoad) { if (this.props.onLoad) {
this.props.onLoad(); this.props.onLoad();
} }
}; }
// //
// Render // Render

View File

@@ -8,5 +8,5 @@
.deleteFilesMessage { .deleteFilesMessage {
margin-top: 20px; margin-top: 20px;
color: var(--dangerColor); color: $dangerColor;
} }

View File

@@ -33,11 +33,11 @@ class DeleteAuthorModalContent extends Component {
onDeleteFilesChange = ({ value }) => { onDeleteFilesChange = ({ value }) => {
this.setState({ deleteFiles: value }); this.setState({ deleteFiles: value });
}; }
onAddImportListExclusionChange = ({ value }) => { onAddImportListExclusionChange = ({ value }) => {
this.setState({ addImportListExclusion: value }); this.setState({ addImportListExclusion: value });
}; }
onDeleteAuthorConfirmed = () => { onDeleteAuthorConfirmed = () => {
const deleteFiles = this.state.deleteFiles; const deleteFiles = this.state.deleteFiles;
@@ -46,7 +46,7 @@ class DeleteAuthorModalContent extends Component {
this.setState({ deleteFiles: false }); this.setState({ deleteFiles: false });
this.setState({ addImportListExclusion: false }); this.setState({ addImportListExclusion: false });
this.props.onDeletePress(deleteFiles, addImportListExclusion); this.props.onDeletePress(deleteFiles, addImportListExclusion);
}; }
// //
// Render // Render

View File

@@ -32,7 +32,7 @@ class DeleteAuthorModalContentConnector extends Component {
}); });
this.props.onModalClose(true); this.props.onModalClose(true);
}; }
// //
// Render // Render

View File

@@ -9,7 +9,7 @@
} }
.metadataMessage { .metadataMessage {
color: var(--helpTextColor); color: $helpTextColor;
text-align: center; text-align: center;
font-weight: 300; font-weight: 300;
font-size: 20px; font-size: 20px;
@@ -22,7 +22,7 @@
.tabList { .tabList {
margin: 0; margin: 0;
padding: 0; padding: 0;
border-bottom: 1px solid var(--lightGray); border-bottom: 1px solid $lightGray;
} }
.tab { .tab {
@@ -37,7 +37,7 @@
} }
.selectedTab { .selectedTab {
border-bottom: 4px solid var(--linkColor); border-bottom: 4px solid $linkColor;
} }
.tabContent { .tabContent {
@@ -63,7 +63,7 @@
white-space: nowrap; white-space: nowrap;
&:hover { &:hover {
color: var(--iconButtonHoverLightColor); color: $iconButtonHoverLightColor;
} }
} }

View File

@@ -99,69 +99,69 @@ class AuthorDetails extends Component {
} }
this.setState({ selectedState: newSelectedState, allSelected: isAllSelected, allUnselected: isAllUnselected }); this.setState({ selectedState: newSelectedState, allSelected: isAllSelected, allUnselected: isAllUnselected });
}; }
getSelectedIds = () => { getSelectedIds = () => {
return getSelectedIds(this.state.selectedState); return getSelectedIds(this.state.selectedState);
}; }
// //
// Listeners // Listeners
onOrganizePress = () => { onOrganizePress = () => {
this.setState({ isOrganizeModalOpen: true }); this.setState({ isOrganizeModalOpen: true });
}; }
onOrganizeModalClose = () => { onOrganizeModalClose = () => {
this.setState({ isOrganizeModalOpen: false }); this.setState({ isOrganizeModalOpen: false });
}; }
onRetagPress = () => { onRetagPress = () => {
this.setState({ isRetagModalOpen: true }); this.setState({ isRetagModalOpen: true });
}; }
onRetagModalClose = () => { onRetagModalClose = () => {
this.setState({ isRetagModalOpen: false }); this.setState({ isRetagModalOpen: false });
}; }
onInteractiveImportPress = () => { onInteractiveImportPress = () => {
this.setState({ isInteractiveImportModalOpen: true }); this.setState({ isInteractiveImportModalOpen: true });
}; }
onInteractiveImportModalClose = () => { onInteractiveImportModalClose = () => {
this.setState({ isInteractiveImportModalOpen: false }); this.setState({ isInteractiveImportModalOpen: false });
}; }
onEditAuthorPress = () => { onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true }); this.setState({ isEditAuthorModalOpen: true });
}; }
onEditAuthorModalClose = () => { onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false }); this.setState({ isEditAuthorModalOpen: false });
}; }
onDeleteAuthorPress = () => { onDeleteAuthorPress = () => {
this.setState({ this.setState({
isEditAuthorModalOpen: false, isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true isDeleteAuthorModalOpen: true
}); });
}; }
onDeleteAuthorModalClose = () => { onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false }); this.setState({ isDeleteAuthorModalOpen: false });
}; }
onMonitorOptionsPress = () => { onMonitorOptionsPress = () => {
this.setState({ isMonitorOptionsModalOpen: true }); this.setState({ isMonitorOptionsModalOpen: true });
}; }
onMonitorOptionsClose = () => { onMonitorOptionsClose = () => {
this.setState({ isMonitorOptionsModalOpen: false }); this.setState({ isMonitorOptionsModalOpen: false });
}; }
onBookEditorTogglePress = () => { onBookEditorTogglePress = () => {
this.setState({ isEditorActive: !this.state.isEditorActive }); this.setState({ isEditorActive: !this.state.isEditorActive });
}; }
onExpandAllPress = () => { onExpandAllPress = () => {
const { const {
@@ -170,7 +170,7 @@ class AuthorDetails extends Component {
} = this.state; } = this.state;
this.setState(getExpandedState(selectAll(expandedState, !allExpanded))); this.setState(getExpandedState(selectAll(expandedState, !allExpanded)));
}; }
onExpandPress = (bookId, isExpanded) => { onExpandPress = (bookId, isExpanded) => {
this.setState((state) => { this.setState((state) => {
@@ -184,32 +184,32 @@ class AuthorDetails extends Component {
return getExpandedState(newState); return getExpandedState(newState);
}); });
}; }
onSelectAllChange = ({ value }) => { onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value)); this.setState(selectAll(this.state.selectedState, value));
}; }
onSelectAllPress = () => { onSelectAllPress = () => {
this.onSelectAllChange({ value: !this.state.allSelected }); this.onSelectAllChange({ value: !this.state.allSelected });
}; }
onSelectedChange = (items, id, value, shiftKey = false) => { onSelectedChange = (items, id, value, shiftKey = false) => {
this.setState((state) => { this.setState((state) => {
return toggleSelected(state, items, id, value, shiftKey); return toggleSelected(state, items, id, value, shiftKey);
}); });
}; }
onSaveSelected = (changes) => { onSaveSelected = (changes) => {
this.props.onSaveSelected({ this.props.onSaveSelected({
bookIds: this.getSelectedIds(), bookIds: this.getSelectedIds(),
...changes ...changes
}); });
}; }
onTabSelect = (index, lastIndex) => { onTabSelect = (index, lastIndex) => {
this.setState({ selectedTabIndex: index }); this.setState({ selectedTabIndex: index });
}; }
// //
// Render // Render

View File

@@ -270,7 +270,7 @@ class AuthorDetailsConnector extends Component {
this.props.fetchSeries({ authorId }); this.props.fetchSeries({ authorId });
this.props.fetchBookFiles({ authorId }); this.props.fetchBookFiles({ authorId });
this.props.fetchQueueDetails({ authorId }); this.props.fetchQueueDetails({ authorId });
}; }
unpopulate = () => { unpopulate = () => {
this.props.cancelFetchReleases(); this.props.cancelFetchReleases();
@@ -278,7 +278,7 @@ class AuthorDetailsConnector extends Component {
this.props.clearBookFiles(); this.props.clearBookFiles();
this.props.clearQueueDetails(); this.props.clearQueueDetails();
this.props.clearReleases(); this.props.clearReleases();
}; }
// //
// Listeners // Listeners
@@ -288,25 +288,25 @@ class AuthorDetailsConnector extends Component {
authorId: this.props.id, authorId: this.props.id,
monitored monitored
}); });
}; }
onRefreshPress = () => { onRefreshPress = () => {
this.props.executeCommand({ this.props.executeCommand({
name: commandNames.REFRESH_AUTHOR, name: commandNames.REFRESH_AUTHOR,
authorId: this.props.id authorId: this.props.id
}); });
}; }
onSearchPress = () => { onSearchPress = () => {
this.props.executeCommand({ this.props.executeCommand({
name: commandNames.AUTHOR_SEARCH, name: commandNames.AUTHOR_SEARCH,
authorId: this.props.id authorId: this.props.id
}); });
}; }
onSaveSelected = (payload) => { onSaveSelected = (payload) => {
this.props.saveBookEditor(payload); this.props.saveBookEditor(payload);
}; }
// //
// Render // Render

View File

@@ -16,7 +16,7 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: var(--black); background: $black;
opacity: 0.7; opacity: 0.7;
} }
@@ -25,7 +25,7 @@
padding: 30px; padding: 30px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: var(--white); color: $white;
} }
.poster { .poster {
@@ -69,7 +69,7 @@
width: 40px; width: 40px;
&:hover { &:hover {
color: var(--iconButtonHoverLightColor); color: $iconButtonHoverLightColor;
} }
} }
@@ -97,7 +97,7 @@
white-space: nowrap; white-space: nowrap;
&:hover { &:hover {
color: var(--iconButtonHoverLightColor); color: $iconButtonHoverLightColor;
} }
} }

View File

@@ -52,11 +52,11 @@ class AuthorDetailsHeader extends Component {
onOverviewMeasure = ({ height }) => { onOverviewMeasure = ({ height }) => {
this.setState({ overviewHeight: height }); this.setState({ overviewHeight: height });
}; }
onTitleMeasure = ({ width }) => { onTitleMeasure = ({ width }) => {
this.setState({ titleWidth: width }); this.setState({ titleWidth: width });
}; }
// //
// Render // Render

View File

@@ -48,7 +48,7 @@ class AuthorDetailsHeaderConnector extends Component {
authorId: this.props.authorId, authorId: this.props.authorId,
monitored monitored
}); });
}; }
// //
// Render // Render

View File

@@ -1,8 +1,8 @@
.bookType { .bookType {
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid var(--borderColor); border: 1px solid $borderColor;
border-radius: 4px; border-radius: 4px;
background-color: var(--cardBackgroundColor); background-color: $white;
&:last-of-type { &:last-of-type {
margin-bottom: 0; margin-bottom: 0;
@@ -77,7 +77,7 @@
.books { .books {
padding-top: 15px; padding-top: 15px;
border-top: 1px solid var(--borderColor); border-top: 1px solid $borderColor;
} }
.collapseButtonContainer { .collapseButtonContainer {
@@ -86,10 +86,10 @@
justify-content: center; justify-content: center;
padding: 10px 15px; padding: 10px 15px;
width: 100%; width: 100%;
border-top: 1px solid var(--borderColor); border-top: 1px solid $borderColor;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
background-color: var(--collapseButtonBackgroundColor); background-color: #fafafa;
} }
.collapseButtonIcon { .collapseButtonIcon {

View File

@@ -61,7 +61,7 @@ class AuthorDetailsSeason extends Component {
this.setState({ lastToggledBook: bookId }); this.setState({ lastToggledBook: bookId });
this.props.onMonitorBookPress(_.uniq(bookIds), monitored); this.props.onMonitorBookPress(_.uniq(bookIds), monitored);
}; }
onSelectedChange = ({ id, value, shiftKey = false }) => { onSelectedChange = ({ id, value, shiftKey = false }) => {
const { const {
@@ -70,7 +70,7 @@ class AuthorDetailsSeason extends Component {
} = this.props; } = this.props;
return onSelectedChange(items, id, value, shiftKey); return onSelectedChange(items, id, value, shiftKey);
}; }
// //
// Render // Render

View File

@@ -66,18 +66,18 @@ class AuthorDetailsSeasonConnector extends Component {
onTableOptionChange = (payload) => { onTableOptionChange = (payload) => {
this.props.setBooksTableOption(payload); this.props.setBooksTableOption(payload);
}; }
onSortPress = (sortKey) => { onSortPress = (sortKey) => {
this.props.setAuthorDetailsSort({ sortKey }); this.props.setAuthorDetailsSort({ sortKey });
}; }
onMonitorBookPress = (bookIds, monitored) => { onMonitorBookPress = (bookIds, monitored) => {
this.props.toggleBooksMonitored({ this.props.toggleBooksMonitored({
bookIds, bookIds,
monitored monitored
}); });
}; }
// //
// Render // Render

View File

@@ -1,8 +1,8 @@
.bookType { .bookType {
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid var(--borderColor); border: 1px solid $borderColor;
border-radius: 4px; border-radius: 4px;
background-color: var(--cardBackgroundColor); background-color: $white;
&:last-of-type { &:last-of-type {
margin-bottom: 0; margin-bottom: 0;
@@ -77,7 +77,7 @@
.books { .books {
padding-top: 15px; padding-top: 15px;
border-top: 1px solid var(--borderColor); border-top: 1px solid $borderColor;
} }
.collapseButtonContainer { .collapseButtonContainer {
@@ -86,10 +86,10 @@
justify-content: center; justify-content: center;
padding: 10px 15px; padding: 10px 15px;
width: 100%; width: 100%;
border-top: 1px solid var(--borderColor); border-top: 1px solid $borderColor;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
background-color: var(--cardBackgroundColor); background-color: #fafafa;
} }
.collapseButtonIcon { .collapseButtonIcon {

View File

@@ -73,7 +73,7 @@ class AuthorDetailsSeries extends Component {
} = this.props; } = this.props;
this.props.onExpandPress(id, !isExpanded); this.props.onExpandPress(id, !isExpanded);
}; }
onMonitorBookPress = (bookId, monitored, { shiftKey }) => { onMonitorBookPress = (bookId, monitored, { shiftKey }) => {
const lastToggled = this.state.lastToggledBook; const lastToggled = this.state.lastToggledBook;
@@ -91,13 +91,13 @@ class AuthorDetailsSeries extends Component {
this.setState({ lastToggledBook: bookId }); this.setState({ lastToggledBook: bookId });
this.props.onMonitorBookPress(_.uniq(bookIds), monitored); this.props.onMonitorBookPress(_.uniq(bookIds), monitored);
}; }
onMonitorSeriesPress = (monitored, { shiftKey }) => { onMonitorSeriesPress = (monitored, { shiftKey }) => {
const bookIds = this.props.items.map((book) => book.id); const bookIds = this.props.items.map((book) => book.id);
this.props.onMonitorBookPress(_.uniq(bookIds), monitored); this.props.onMonitorBookPress(_.uniq(bookIds), monitored);
}; }
// //
// Render // Render

View File

@@ -81,18 +81,18 @@ class AuthorDetailsSeasonConnector extends Component {
onTableOptionChange = (payload) => { onTableOptionChange = (payload) => {
this.props.setSeriesTableOption(payload); this.props.setSeriesTableOption(payload);
}; }
onSortPress = (sortKey) => { onSortPress = (sortKey) => {
this.props.dispatchSetSeriesSort({ sortKey }); this.props.dispatchSetSeriesSort({ sortKey });
}; }
onMonitorBookPress = (bookIds, monitored) => { onMonitorBookPress = (bookIds, monitored) => {
this.props.toggleBooksMonitored({ this.props.toggleBooksMonitored({
bookIds, bookIds,
monitored monitored
}); });
}; }
// //
// Render // Render

View File

@@ -30,23 +30,23 @@ class BookRow extends Component {
onManualSearchPress = () => { onManualSearchPress = () => {
this.setState({ isDetailsModalOpen: true }); this.setState({ isDetailsModalOpen: true });
}; }
onDetailsModalClose = () => { onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false }); this.setState({ isDetailsModalOpen: false });
}; }
onEditBookPress = () => { onEditBookPress = () => {
this.setState({ isEditBookModalOpen: true }); this.setState({ isEditBookModalOpen: true });
}; }
onEditBookModalClose = () => { onEditBookModalClose = () => {
this.setState({ isEditBookModalOpen: false }); this.setState({ isEditBookModalOpen: false });
}; }
onMonitorBookPress = (monitored, options) => { onMonitorBookPress = (monitored, options) => {
this.props.onMonitorBookPress(this.props.id, monitored, options); this.props.onMonitorBookPress(this.props.id, monitored, options);
}; }
// //
// Render // Render

View File

@@ -16,7 +16,7 @@ class EditAuthorModalConnector extends Component {
onModalClose = () => { onModalClose = () => {
this.props.clearPendingChanges({ section: 'author' }); this.props.clearPendingChanges({ section: 'author' });
this.props.onModalClose(); this.props.onModalClose();
}; }
// //
// Render // Render

View File

@@ -48,13 +48,13 @@ class EditAuthorModalContent extends Component {
onSavePress(false); onSavePress(false);
} }
}; }
onMoveAuthorPress = () => { onMoveAuthorPress = () => {
this.setState({ isConfirmMoveModalOpen: false }); this.setState({ isConfirmMoveModalOpen: false });
this.props.onSavePress(true); this.props.onSavePress(true);
}; }
// //
// Render // Render

View File

@@ -83,14 +83,14 @@ class EditAuthorModalContentConnector extends Component {
onInputChange = ({ name, value }) => { onInputChange = ({ name, value }) => {
this.props.dispatchSetAuthorValue({ name, value }); this.props.dispatchSetAuthorValue({ name, value });
}; }
onSavePress = (moveFiles) => { onSavePress = (moveFiles) => {
this.props.dispatchSaveAuthor({ this.props.dispatchSaveAuthor({
id: this.props.authorId, id: this.props.authorId,
moveFiles moveFiles
}); });
}; }
// //
// Render // Render

View File

@@ -30,11 +30,11 @@ class RetagAuthorModalContent extends Component {
onCheckInputChange = ({ name, value }) => { onCheckInputChange = ({ name, value }) => {
this.setState({ [name]: value }); this.setState({ [name]: value });
}; }
onRetagAuthorPress = () => { onRetagAuthorPress = () => {
this.props.onRetagAuthorPress(this.state.updateCovers, this.state.embedMetadata); this.props.onRetagAuthorPress(this.state.updateCovers, this.state.embedMetadata);
}; }
// //
// Render // Render

View File

@@ -45,7 +45,7 @@ class RetagAuthorModalContentConnector extends Component {
}); });
this.props.onModalClose(true); this.props.onModalClose(true);
}; }
// //
// Render // Render

View File

@@ -80,7 +80,7 @@ class AuthorEditorFooter extends Component {
default: default:
this.props.onSaveSelected({ [name]: value }); this.props.onSaveSelected({ [name]: value });
} }
}; }
onApplyTagsPress = (tags, applyTags) => { onApplyTagsPress = (tags, applyTags) => {
this.setState({ this.setState({
@@ -92,23 +92,23 @@ class AuthorEditorFooter extends Component {
tags, tags,
applyTags applyTags
}); });
}; }
onDeleteSelectedPress = () => { onDeleteSelectedPress = () => {
this.setState({ isDeleteAuthorModalOpen: true }); this.setState({ isDeleteAuthorModalOpen: true });
}; }
onDeleteAuthorModalClose = () => { onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false }); this.setState({ isDeleteAuthorModalOpen: false });
}; }
onTagsPress = () => { onTagsPress = () => {
this.setState({ isTagsModalOpen: true }); this.setState({ isTagsModalOpen: true });
}; }
onTagsModalClose = () => { onTagsModalClose = () => {
this.setState({ isTagsModalOpen: false }); this.setState({ isTagsModalOpen: false });
}; }
onSaveRootFolderPress = () => { onSaveRootFolderPress = () => {
this.setState({ this.setState({
@@ -117,7 +117,7 @@ class AuthorEditorFooter extends Component {
}); });
this.props.onSaveSelected({ rootFolderPath: this.state.destinationRootFolder }); this.props.onSaveSelected({ rootFolderPath: this.state.destinationRootFolder });
}; }
onMoveAuthorPress = () => { onMoveAuthorPress = () => {
this.setState({ this.setState({
@@ -129,7 +129,7 @@ class AuthorEditorFooter extends Component {
rootFolderPath: this.state.destinationRootFolder, rootFolderPath: this.state.destinationRootFolder,
moveFiles: true moveFiles: true
}); });
}; }
// //
// Render // Render

View File

@@ -16,7 +16,7 @@ class AuthorEditorRow extends Component {
onBookFolderChange = () => { onBookFolderChange = () => {
// Mock handler to satisfy `onChange` being required for `CheckInput`. // Mock handler to satisfy `onChange` being required for `CheckInput`.
// //
}; }
// //
// Render // Render

View File

@@ -9,5 +9,5 @@
.path { .path {
margin-left: 5px; margin-left: 5px;
color: var(--dangerColor); color: $dangerColor;
} }

View File

@@ -29,14 +29,14 @@ class DeleteAuthorModalContent extends Component {
onDeleteFilesChange = ({ value }) => { onDeleteFilesChange = ({ value }) => {
this.setState({ deleteFiles: value }); this.setState({ deleteFiles: value });
}; }
onDeleteAuthorConfirmed = () => { onDeleteAuthorConfirmed = () => {
const deleteFiles = this.state.deleteFiles; const deleteFiles = this.state.deleteFiles;
this.setState({ deleteFiles: false }); this.setState({ deleteFiles: false });
this.props.onDeleteSelectedPress(deleteFiles); this.props.onDeleteSelectedPress(deleteFiles);
}; }
// //
// Render // Render

View File

@@ -43,7 +43,7 @@ class OrganizeAuthorModalContentConnector extends Component {
}); });
this.props.onModalClose(true); this.props.onModalClose(true);
}; }
// //
// Render // Render

View File

@@ -34,7 +34,7 @@ class TagsModalContent extends Component {
onInputChange = ({ name, value }) => { onInputChange = ({ name, value }) => {
this.setState({ [name]: value }); this.setState({ [name]: value });
}; }
onApplyTagsPress = () => { onApplyTagsPress = () => {
const { const {
@@ -43,7 +43,7 @@ class TagsModalContent extends Component {
} = this.state; } = this.state;
this.props.onApplyTagsPress(tags, applyTags); this.props.onApplyTagsPress(tags, applyTags);
}; }
// //
// Render // Render

View File

@@ -54,7 +54,7 @@ class AuthorHistoryContentConnector extends Component {
authorId, authorId,
bookId bookId
}); });
}; }
// //
// Render // Render

View File

@@ -55,16 +55,16 @@ class AuthorHistoryRow extends Component {
onMarkAsFailedPress = () => { onMarkAsFailedPress = () => {
this.setState({ isMarkAsFailedModalOpen: true }); this.setState({ isMarkAsFailedModalOpen: true });
}; }
onConfirmMarkAsFailed = () => { onConfirmMarkAsFailed = () => {
this.props.onMarkAsFailedPress(this.props.id); this.props.onMarkAsFailedPress(this.props.id);
this.setState({ isMarkAsFailedModalOpen: false }); this.setState({ isMarkAsFailedModalOpen: false });
}; }
onMarkAsFailedModalClose = () => { onMarkAsFailedModalClose = () => {
this.setState({ isMarkAsFailedModalOpen: false }); this.setState({ isMarkAsFailedModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -99,14 +99,14 @@ class AuthorIndex extends Component {
setScrollerRef = (ref) => { setScrollerRef = (ref) => {
this.setState({ scroller: ref }); this.setState({ scroller: ref });
}; }
getSelectedIds = () => { getSelectedIds = () => {
if (this.state.allUnselected) { if (this.state.allUnselected) {
return []; return [];
} }
return getSelectedIds(this.state.selectedState); return getSelectedIds(this.state.selectedState);
}; }
setSelectedState() { setSelectedState() {
const { const {
@@ -192,19 +192,19 @@ class AuthorIndex extends Component {
onPosterOptionsPress = () => { onPosterOptionsPress = () => {
this.setState({ isPosterOptionsModalOpen: true }); this.setState({ isPosterOptionsModalOpen: true });
}; }
onPosterOptionsModalClose = () => { onPosterOptionsModalClose = () => {
this.setState({ isPosterOptionsModalOpen: false }); this.setState({ isPosterOptionsModalOpen: false });
}; }
onOverviewOptionsPress = () => { onOverviewOptionsPress = () => {
this.setState({ isOverviewOptionsModalOpen: true }); this.setState({ isOverviewOptionsModalOpen: true });
}; }
onOverviewOptionsModalClose = () => { onOverviewOptionsModalClose = () => {
this.setState({ isOverviewOptionsModalOpen: false }); this.setState({ isOverviewOptionsModalOpen: false });
}; }
onEditorTogglePress = () => { onEditorTogglePress = () => {
if (this.state.isEditorActive) { if (this.state.isEditorActive) {
@@ -214,36 +214,36 @@ class AuthorIndex extends Component {
newState.isEditorActive = true; newState.isEditorActive = true;
this.setState(newState); this.setState(newState);
} }
}; }
onJumpBarItemPress = (jumpToCharacter) => { onJumpBarItemPress = (jumpToCharacter) => {
this.setState({ jumpToCharacter }); this.setState({ jumpToCharacter });
}; }
onSelectAllChange = ({ value }) => { onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value)); this.setState(selectAll(this.state.selectedState, value));
}; }
onSelectAllPress = () => { onSelectAllPress = () => {
this.onSelectAllChange({ value: !this.state.allSelected }); this.onSelectAllChange({ value: !this.state.allSelected });
}; }
onSelectedChange = ({ id, value, shiftKey = false }) => { onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => { this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey); return toggleSelected(state, this.props.items, id, value, shiftKey);
}); });
}; }
onSaveSelected = (changes) => { onSaveSelected = (changes) => {
this.props.onSaveSelected({ this.props.onSaveSelected({
authorIds: this.getSelectedIds(), authorIds: this.getSelectedIds(),
...changes ...changes
}); });
}; }
onOrganizeAuthorPress = () => { onOrganizeAuthorPress = () => {
this.setState({ isOrganizingAuthorModalOpen: true }); this.setState({ isOrganizingAuthorModalOpen: true });
}; }
onOrganizeAuthorModalClose = (organized) => { onOrganizeAuthorModalClose = (organized) => {
this.setState({ isOrganizingAuthorModalOpen: false }); this.setState({ isOrganizingAuthorModalOpen: false });
@@ -251,11 +251,11 @@ class AuthorIndex extends Component {
if (organized === true) { if (organized === true) {
this.onSelectAllChange({ value: false }); this.onSelectAllChange({ value: false });
} }
}; }
onRetagAuthorPress = () => { onRetagAuthorPress = () => {
this.setState({ isRetaggingAuthorModalOpen: true }); this.setState({ isRetaggingAuthorModalOpen: true });
}; }
onRetagAuthorModalClose = (organized) => { onRetagAuthorModalClose = (organized) => {
this.setState({ isRetaggingAuthorModalOpen: false }); this.setState({ isRetaggingAuthorModalOpen: false });
@@ -263,14 +263,14 @@ class AuthorIndex extends Component {
if (organized === true) { if (organized === true) {
this.onSelectAllChange({ value: false }); this.onSelectAllChange({ value: false });
} }
}; }
onRefreshAuthorPress = () => { onRefreshAuthorPress = () => {
const selectedIds = this.getSelectedIds(); const selectedIds = this.getSelectedIds();
const refreshIds = this.state.isEditorActive && selectedIds.length > 0 ? selectedIds : []; const refreshIds = this.state.isEditorActive && selectedIds.length > 0 ? selectedIds : [];
this.props.onRefreshAuthorPress(refreshIds); this.props.onRefreshAuthorPress(refreshIds);
}; }
// //
// Render // Render

View File

@@ -85,15 +85,15 @@ class AuthorIndexConnector extends Component {
onViewSelect = (view) => { onViewSelect = (view) => {
this.props.dispatchSetAuthorView(view); this.props.dispatchSetAuthorView(view);
}; }
onSaveSelected = (payload) => { onSaveSelected = (payload) => {
this.props.dispatchSaveAuthorEditor(payload); this.props.dispatchSaveAuthorEditor(payload);
}; }
onScroll = ({ scrollTop }) => { onScroll = ({ scrollTop }) => {
scrollPositions.authorIndex = scrollTop; scrollPositions.authorIndex = scrollTop;
}; }
// //
// Render // Render

View File

@@ -21,32 +21,32 @@
.continuing { .continuing {
composes: legendItemColor; composes: legendItemColor;
background-color: var(--primaryColor); background-color: $primaryColor;
} }
.ended { .ended {
composes: legendItemColor; composes: legendItemColor;
background-color: var(--successColor); background-color: $successColor;
} }
.missingMonitored { .missingMonitored {
composes: legendItemColor; composes: legendItemColor;
background-color: var(--dangerColor); background-color: $dangerColor;
&:global(.colorImpaired) { &:global(.colorImpaired) {
background: repeating-linear-gradient(90deg, color(#f05050 shade(5%)), color(#f05050 shade(5%)) 5px, color(#f05050 shade(15%)) 5px, color(#f05050 shade(15%)) 10px); background: repeating-linear-gradient(90deg, color($dangerColor shade(5%)), color($dangerColor shade(5%)) 5px, color($dangerColor shade(15%)) 5px, color($dangerColor shade(15%)) 10px);
} }
} }
.missingUnmonitored { .missingUnmonitored {
composes: legendItemColor; composes: legendItemColor;
background-color: var(--warningColor); background-color: $warningColor;
&:global(.colorImpaired) { &:global(.colorImpaired) {
background: repeating-linear-gradient(45deg, #ffa500, #ffa500 5px, color(#ffa500 tint(15%)) 5px, color(#ffa500 tint(15%)) 10px); background: repeating-linear-gradient(45deg, $warningColor, $warningColor 5px, color($warningColor tint(15%)) 5px, color($warningColor tint(15%)) 10px);
} }
} }

View File

@@ -98,14 +98,14 @@ class AuthorIndexItemConnector extends Component {
name: commandNames.REFRESH_AUTHOR, name: commandNames.REFRESH_AUTHOR,
authorId: this.props.id authorId: this.props.id
}); });
}; }
onSearchPress = () => { onSearchPress = () => {
this.props.dispatchExecuteCommand({ this.props.dispatchExecuteCommand({
name: commandNames.AUTHOR_SEARCH, name: commandNames.AUTHOR_SEARCH,
authorId: this.props.id authorId: this.props.id
}); });
}; }
// //
// Render // Render

View File

@@ -3,7 +3,7 @@ $hoverScale: 1.05;
.container { .container {
&:hover { &:hover {
.content { .content {
background-color: var(--tableRowHoverBackgroundColor); background-color: $tableRowHoverBackgroundColor;
} }
} }
} }
@@ -35,10 +35,10 @@ $hoverScale: 1.05;
composes: link from '~Components/Link/Link.css'; composes: link from '~Components/Link/Link.css';
display: block; display: block;
color: var(--defaultColor); color: $defaultColor;
&:hover { &:hover {
color: var(--defaultColor); color: $defaultColor;
text-decoration: none; text-decoration: none;
} }
} }
@@ -52,8 +52,8 @@ $hoverScale: 1.05;
height: 0; height: 0;
border-width: 0 25px 25px 0; border-width: 0 25px 25px 0;
border-style: solid; border-style: solid;
border-color: transparent var(--dangerColor) transparent transparent; border-color: transparent $dangerColor transparent transparent;
color: var(--white); color: $white;
} }
.info { .info {

View File

@@ -51,22 +51,22 @@ class AuthorIndexOverview extends Component {
onEditAuthorPress = () => { onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true }); this.setState({ isEditAuthorModalOpen: true });
}; }
onEditAuthorModalClose = () => { onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false }); this.setState({ isEditAuthorModalOpen: false });
}; }
onDeleteAuthorPress = () => { onDeleteAuthorPress = () => {
this.setState({ this.setState({
isEditAuthorModalOpen: false, isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true isDeleteAuthorModalOpen: true
}); });
}; }
onDeleteAuthorModalClose = () => { onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false }); this.setState({ isDeleteAuthorModalOpen: false });
}; }
onChange = ({ value, shiftKey }) => { onChange = ({ value, shiftKey }) => {
const { const {
@@ -75,7 +75,7 @@ class AuthorIndexOverview extends Component {
} = this.props; } = this.props;
onSelectedChange({ id, value, shiftKey }); onSelectedChange({ id, value, shiftKey });
}; }
// //
// Render // Render

View File

@@ -123,7 +123,7 @@ class AuthorIndexOverviews extends Component {
setGridRef = (ref) => { setGridRef = (ref) => {
this._grid = ref; this._grid = ref;
}; }
calculateGrid = (width = this.state.width, isSmallScreen) => { calculateGrid = (width = this.state.width, isSmallScreen) => {
const { const {
@@ -141,7 +141,7 @@ class AuthorIndexOverviews extends Component {
posterHeight, posterHeight,
rowHeight rowHeight
}); });
}; }
cellRenderer = ({ key, rowIndex, style }) => { cellRenderer = ({ key, rowIndex, style }) => {
const { const {
@@ -197,14 +197,14 @@ class AuthorIndexOverviews extends Component {
/> />
</div> </div>
); );
}; }
// //
// Listeners // Listeners
onMeasure = ({ width }) => { onMeasure = ({ width }) => {
this.calculateGrid(width, this.props.isSmallScreen); this.calculateGrid(width, this.props.isSmallScreen);
}; }
// //
// Render // Render

View File

@@ -122,7 +122,7 @@ class AuthorIndexOverviewOptionsModalContent extends Component {
}, () => { }, () => {
this.props.onChangeOverviewOption({ [name]: value }); this.props.onChangeOverviewOption({ [name]: value });
}); });
}; }
// //
// Render // Render

View File

@@ -5,7 +5,7 @@ $hoverScale: 1.05;
&:hover { &:hover {
z-index: 2; z-index: 2;
box-shadow: 0 0 12px var(--black); box-shadow: 0 0 12px $black;
transition: all 200ms ease-in; transition: all 200ms ease-in;
.controls { .controls {
@@ -32,7 +32,7 @@ $hoverScale: 1.05;
position: relative; position: relative;
display: block; display: block;
height: 70px; height: 70px;
background-color: var(--defaultColor); background-color: $defaultColor;
} }
.overlayTitle { .overlayTitle {
@@ -45,13 +45,13 @@ $hoverScale: 1.05;
padding: 5px; padding: 5px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: var(--offWhite); color: $offWhite;
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
} }
.nextAiring { .nextAiring {
background-color: var(--seriesBackgroundColor); background-color: #fafbfc;
text-align: center; text-align: center;
font-size: $smallFontSize; font-size: $smallFontSize;
} }
@@ -59,7 +59,8 @@ $hoverScale: 1.05;
.title { .title {
@add-mixin truncate; @add-mixin truncate;
background-color: var(--seriesBackgroundColor); background-color: $defaultColor;
color: $white;
text-align: center; text-align: center;
font-size: $smallFontSize; font-size: $smallFontSize;
} }
@@ -73,8 +74,8 @@ $hoverScale: 1.05;
height: 0; height: 0;
border-width: 0 25px 25px 0; border-width: 0 25px 25px 0;
border-style: solid; border-style: solid;
border-color: transparent var(--dangerColor) transparent transparent; border-color: transparent $dangerColor transparent transparent;
color: var(--white); color: $white;
} }
.editorSelect { .editorSelect {
@@ -90,8 +91,8 @@ $hoverScale: 1.05;
left: 10px; left: 10px;
z-index: 3; z-index: 3;
border-radius: 4px; border-radius: 4px;
background-color: var(--readarrRed); background-color: $themeLightColor;
color: var(--white); color: $white;
font-size: $smallFontSize; font-size: $smallFontSize;
opacity: 0; opacity: 0;
transition: opacity 0; transition: opacity 0;

View File

@@ -35,34 +35,34 @@ class AuthorIndexPoster extends Component {
onEditAuthorPress = () => { onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true }); this.setState({ isEditAuthorModalOpen: true });
}; }
onEditAuthorModalClose = () => { onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false }); this.setState({ isEditAuthorModalOpen: false });
}; }
onDeleteAuthorPress = () => { onDeleteAuthorPress = () => {
this.setState({ this.setState({
isEditAuthorModalOpen: false, isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true isDeleteAuthorModalOpen: true
}); });
}; }
onDeleteAuthorModalClose = () => { onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false }); this.setState({ isDeleteAuthorModalOpen: false });
}; }
onPosterLoad = () => { onPosterLoad = () => {
if (this.state.hasPosterError) { if (this.state.hasPosterError) {
this.setState({ hasPosterError: false }); this.setState({ hasPosterError: false });
} }
}; }
onPosterLoadError = () => { onPosterLoadError = () => {
if (!this.state.hasPosterError) { if (!this.state.hasPosterError) {
this.setState({ hasPosterError: true }); this.setState({ hasPosterError: true });
} }
}; }
onChange = ({ value, shiftKey }) => { onChange = ({ value, shiftKey }) => {
const { const {
@@ -71,7 +71,7 @@ class AuthorIndexPoster extends Component {
} = this.props; } = this.props;
onSelectedChange({ id, value, shiftKey }); onSelectedChange({ id, value, shiftKey });
}; }
// //
// Render // Render

View File

@@ -1,5 +1,5 @@
.info { .info {
background-color: var(--seriesBackgroundColor); background-color: #fafbfc;
text-align: center; text-align: center;
font-size: $smallFontSize; font-size: $smallFontSize;
} }

View File

@@ -171,7 +171,7 @@ class AuthorIndexPosters extends Component {
setGridRef = (ref) => { setGridRef = (ref) => {
this._grid = ref; this._grid = ref;
}; }
calculateGrid = (width = this.state.width, isSmallScreen) => { calculateGrid = (width = this.state.width, isSmallScreen) => {
const { const {
@@ -193,7 +193,7 @@ class AuthorIndexPosters extends Component {
posterHeight, posterHeight,
rowHeight rowHeight
}); });
}; }
cellRenderer = ({ key, rowIndex, columnIndex, style }) => { cellRenderer = ({ key, rowIndex, columnIndex, style }) => {
const { const {
@@ -259,14 +259,14 @@ class AuthorIndexPosters extends Component {
/> />
</div> </div>
); );
}; }
// //
// Listeners // Listeners
onMeasure = ({ width }) => { onMeasure = ({ width }) => {
this.calculateGrid(width, this.props.isSmallScreen); this.calculateGrid(width, this.props.isSmallScreen);
}; }
// //
// Render // Render

View File

@@ -93,7 +93,7 @@ class AuthorIndexPosterOptionsModalContent extends Component {
}, () => { }, () => {
this.props.onChangePosterOption({ [name]: value }); this.props.onChangePosterOption({ [name]: value });
}); });
}; }
// //
// Render // Render

View File

@@ -3,7 +3,7 @@
border-radius: 0; border-radius: 0;
background-color: #5b5b5b; background-color: #5b5b5b;
color: var(--white); color: $white;
transition: width 200ms ease; transition: width 200ms ease;
} }

View File

@@ -27,22 +27,22 @@ class AuthorIndexActionsCell extends Component {
onEditAuthorPress = () => { onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true }); this.setState({ isEditAuthorModalOpen: true });
}; }
onEditAuthorModalClose = () => { onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false }); this.setState({ isEditAuthorModalOpen: false });
}; }
onDeleteAuthorPress = () => { onDeleteAuthorPress = () => {
this.setState({ this.setState({
isEditAuthorModalOpen: false, isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true isDeleteAuthorModalOpen: true
}); });
}; }
onDeleteAuthorModalClose = () => { onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false }); this.setState({ isDeleteAuthorModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -31,7 +31,7 @@
position: relative; position: relative;
display: block; display: block;
height: 70px; height: 70px;
background-color: var(--defaultColor); background-color: $defaultColor;
} }
.bannerImage { .bannerImage {
@@ -49,7 +49,7 @@
padding: 5px; padding: 5px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: var(--offWhite); color: $offWhite;
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
} }
@@ -92,7 +92,7 @@
} }
.ratings { .ratings {
composes: cell from '~Components/Table/Cells/VirtualTableRowCell.css'; composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 80px; flex: 0 0 80px;
} }

View File

@@ -40,39 +40,39 @@ class AuthorIndexRow extends Component {
onEditAuthorPress = () => { onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true }); this.setState({ isEditAuthorModalOpen: true });
}; }
onEditAuthorModalClose = () => { onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false }); this.setState({ isEditAuthorModalOpen: false });
}; }
onDeleteAuthorPress = () => { onDeleteAuthorPress = () => {
this.setState({ this.setState({
isEditAuthorModalOpen: false, isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true isDeleteAuthorModalOpen: true
}); });
}; }
onDeleteAuthorModalClose = () => { onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false }); this.setState({ isDeleteAuthorModalOpen: false });
}; }
onUseSceneNumberingChange = () => { onUseSceneNumberingChange = () => {
// Mock handler to satisfy `onChange` being required for `CheckInput`. // Mock handler to satisfy `onChange` being required for `CheckInput`.
// //
}; }
onBannerLoad = () => { onBannerLoad = () => {
if (this.state.hasBannerError) { if (this.state.hasBannerError) {
this.setState({ hasBannerError: false }); this.setState({ hasBannerError: false });
} }
}; }
onBannerLoadError = () => { onBannerLoadError = () => {
if (!this.state.hasBannerError) { if (!this.state.hasBannerError) {
this.setState({ hasBannerError: true }); this.setState({ hasBannerError: true });
} }
}; }
// //
// Render // Render

View File

@@ -78,7 +78,7 @@ class AuthorIndexTable extends Component {
/> />
</VirtualTableRow> </VirtualTableRow>
); );
}; }
// //
// Render // Render

View File

@@ -60,7 +60,7 @@ class AuthorIndexTableOptions extends Component {
} }
}); });
}); });
}; }
// //
// Render // Render

View File

@@ -16,7 +16,7 @@ class MonitoringOptionsModalConnector extends Component {
onModalClose = () => { onModalClose = () => {
this.props.clearPendingChanges({ section: 'authors' }); this.props.clearPendingChanges({ section: 'authors' });
this.props.onModalClose(); this.props.onModalClose();
}; }
// //
// Render // Render

View File

@@ -44,7 +44,7 @@ class MonitoringOptionsModalContent extends Component {
onInputChange = ({ name, value }) => { onInputChange = ({ name, value }) => {
this.setState({ [name]: value }); this.setState({ [name]: value });
}; }
// //
// Listeners // Listeners
@@ -65,11 +65,11 @@ class MonitoringOptionsModalContent extends Component {
if (!isSaving) { if (!isSaving) {
this.onModalClose(); this.onModalClose();
} }
}; }
onModalClose = () => { onModalClose = () => {
this.props.onModalClose(); this.props.onModalClose();
}; }
// //
// Render // Render

View File

@@ -42,14 +42,14 @@ class MonitoringOptionsModalContentConnector extends Component {
onInputChange = ({ name, value }) => { onInputChange = ({ name, value }) => {
this.setState({ name, value }); this.setState({ name, value });
}; }
onSavePress = ({ monitor }) => { onSavePress = ({ monitor }) => {
this.props.dispatchUpdateMonitoringOptions({ this.props.dispatchUpdateMonitoringOptions({
id: this.props.authorId, id: this.props.authorId,
monitor monitor
}); });
}; }
// //
// Render // Render

View File

@@ -25,11 +25,11 @@ class BookSearchCell extends Component {
onManualSearchPress = () => { onManualSearchPress = () => {
this.setState({ isDetailsModalOpen: true }); this.setState({ isDetailsModalOpen: true });
}; }
onDetailsModalClose = () => { onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false }); this.setState({ isDetailsModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -2,7 +2,7 @@
composes: link from '~Components/Link/Link.css'; composes: link from '~Components/Link/Link.css';
&:hover { &:hover {
color: var(--linkHoverColor); color: $linkHoverColor;
text-decoration: underline; text-decoration: underline;
} }
} }

View File

@@ -8,5 +8,5 @@
.deleteFilesMessage { .deleteFilesMessage {
margin-top: 20px; margin-top: 20px;
color: var(--dangerColor); color: $dangerColor;
} }

View File

@@ -32,11 +32,11 @@ class DeleteBookModalContent extends Component {
onDeleteFilesChange = ({ value }) => { onDeleteFilesChange = ({ value }) => {
this.setState({ deleteFiles: value }); this.setState({ deleteFiles: value });
}; }
onAddImportListExclusionChange = ({ value }) => { onAddImportListExclusionChange = ({ value }) => {
this.setState({ addImportListExclusion: value }); this.setState({ addImportListExclusion: value });
}; }
onDeleteBookConfirmed = () => { onDeleteBookConfirmed = () => {
const deleteFiles = this.state.deleteFiles; const deleteFiles = this.state.deleteFiles;
@@ -45,7 +45,7 @@ class DeleteBookModalContent extends Component {
this.setState({ deleteFiles: false }); this.setState({ deleteFiles: false });
this.setState({ addImportListExclusion: false }); this.setState({ addImportListExclusion: false });
this.props.onDeletePress(deleteFiles, addImportListExclusion); this.props.onDeletePress(deleteFiles, addImportListExclusion);
}; }
// //
// Render // Render

View File

@@ -36,7 +36,7 @@ class DeleteBookModalContentConnector extends Component {
this.props.onModalClose(true); this.props.onModalClose(true);
this.props.push(`${window.Readarr.urlBase}/author/${this.props.authorSlug}`); this.props.push(`${window.Readarr.urlBase}/author/${this.props.authorSlug}`);
}; }
// //
// Render // Render

View File

@@ -9,7 +9,7 @@
.tabList { .tabList {
margin: 0; margin: 0;
padding: 0; padding: 0;
border-bottom: 1px solid var(--lightGray); border-bottom: 1px solid $lightGray;
} }
.tab { .tab {
@@ -24,7 +24,7 @@
} }
.selectedTab { .selectedTab {
border-bottom: 4px solid var(--linkColor); border-bottom: 4px solid $linkColor;
} }
.tabContent { .tabContent {
@@ -54,7 +54,7 @@
white-space: nowrap; white-space: nowrap;
&:hover { &:hover {
color: var(--iconButtonHoverLightColor); color: $iconButtonHoverLightColor;
} }
} }

View File

@@ -45,42 +45,42 @@ class BookDetails extends Component {
onOrganizePress = () => { onOrganizePress = () => {
this.setState({ isOrganizeModalOpen: true }); this.setState({ isOrganizeModalOpen: true });
}; }
onOrganizeModalClose = () => { onOrganizeModalClose = () => {
this.setState({ isOrganizeModalOpen: false }); this.setState({ isOrganizeModalOpen: false });
}; }
onRetagPress = () => { onRetagPress = () => {
this.setState({ isRetagModalOpen: true }); this.setState({ isRetagModalOpen: true });
}; }
onRetagModalClose = () => { onRetagModalClose = () => {
this.setState({ isRetagModalOpen: false }); this.setState({ isRetagModalOpen: false });
}; }
onEditBookPress = () => { onEditBookPress = () => {
this.setState({ isEditBookModalOpen: true }); this.setState({ isEditBookModalOpen: true });
}; }
onEditBookModalClose = () => { onEditBookModalClose = () => {
this.setState({ isEditBookModalOpen: false }); this.setState({ isEditBookModalOpen: false });
}; }
onDeleteBookPress = () => { onDeleteBookPress = () => {
this.setState({ this.setState({
isEditBookModalOpen: false, isEditBookModalOpen: false,
isDeleteBookModalOpen: true isDeleteBookModalOpen: true
}); });
}; }
onDeleteBookModalClose = () => { onDeleteBookModalClose = () => {
this.setState({ isDeleteBookModalOpen: false }); this.setState({ isDeleteBookModalOpen: false });
}; }
onTabSelect = (index, lastIndex) => { onTabSelect = (index, lastIndex) => {
this.setState({ selectedTabIndex: index }); this.setState({ selectedTabIndex: index });
}; }
// //
// Render // Render

View File

@@ -146,14 +146,14 @@ class BookDetailsConnector extends Component {
this.props.fetchBookFiles({ bookId }); this.props.fetchBookFiles({ bookId });
this.props.fetchEditions({ bookId }); this.props.fetchEditions({ bookId });
}; }
unpopulate = () => { unpopulate = () => {
this.props.cancelFetchReleases(); this.props.cancelFetchReleases();
this.props.clearReleases(); this.props.clearReleases();
this.props.clearBookFiles(); this.props.clearBookFiles();
this.props.clearEditions(); this.props.clearEditions();
}; }
// //
// Listeners // Listeners
@@ -163,21 +163,21 @@ class BookDetailsConnector extends Component {
bookIds: [this.props.id], bookIds: [this.props.id],
monitored monitored
}); });
}; }
onRefreshPress = () => { onRefreshPress = () => {
this.props.executeCommand({ this.props.executeCommand({
name: commandNames.REFRESH_BOOK, name: commandNames.REFRESH_BOOK,
bookId: this.props.id bookId: this.props.id
}); });
}; }
onSearchPress = () => { onSearchPress = () => {
this.props.executeCommand({ this.props.executeCommand({
name: commandNames.BOOK_SEARCH, name: commandNames.BOOK_SEARCH,
bookIds: [this.props.id] bookIds: [this.props.id]
}); });
}; }
// //
// Render // Render

View File

@@ -16,7 +16,7 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: var(--black); background: $black;
opacity: 0.7; opacity: 0.7;
} }
@@ -25,7 +25,7 @@
padding: 30px; padding: 30px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: var(--white); color: $white;
} }
.cover { .cover {
@@ -69,7 +69,7 @@
width: 40px; width: 40px;
&:hover { &:hover {
color: var(--iconButtonHoverLightColor); color: $iconButtonHoverLightColor;
} }
} }

View File

@@ -48,11 +48,11 @@ class BookDetailsHeader extends Component {
onOverviewMeasure = ({ height }) => { onOverviewMeasure = ({ height }) => {
this.setState({ overviewHeight: height }); this.setState({ overviewHeight: height });
}; }
onTitleMeasure = ({ width }) => { onTitleMeasure = ({ width }) => {
this.setState({ titleWidth: width }); this.setState({ titleWidth: width });
}; }
// //
// Render // Render

View File

@@ -48,7 +48,7 @@ class BookDetailsHeaderConnector extends Component {
bookIds: [this.props.bookId], bookIds: [this.props.bookId],
monitored monitored
}); });
}; }
// //
// Render // Render

View File

@@ -64,7 +64,7 @@ class BookDetailsPageConnector extends Component {
populate = () => { populate = () => {
this.setState({ hasMounted: true }); this.setState({ hasMounted: true });
}; }
// //
// Render // Render

View File

@@ -16,7 +16,7 @@ class EditBookModalConnector extends Component {
onModalClose = () => { onModalClose = () => {
this.props.clearPendingChanges({ section: 'books' }); this.props.clearPendingChanges({ section: 'books' });
this.props.onModalClose(); this.props.onModalClose();
}; }
// //
// Render // Render

View File

@@ -27,7 +27,7 @@ class EditBookModalContent extends Component {
onSavePress(false); onSavePress(false);
}; }
// //
// Render // Render

View File

@@ -76,7 +76,7 @@ class EditBookModalContentConnector extends Component {
onInputChange = ({ name, value }) => { onInputChange = ({ name, value }) => {
this.props.dispatchSetBookValue({ name, value }); this.props.dispatchSetBookValue({ name, value });
}; }
onSavePress = () => { onSavePress = () => {
this.props.dispatchSaveBook({ this.props.dispatchSaveBook({
@@ -85,7 +85,7 @@ class EditBookModalContentConnector extends Component {
this.props.dispatchSaveEditions({ this.props.dispatchSaveEditions({
id: this.props.bookId id: this.props.bookId
}); });
}; }
// //
// Render // Render

View File

@@ -62,15 +62,15 @@ class BookEditorFooter extends Component {
default: default:
this.props.onSaveSelected({ [name]: value }); this.props.onSaveSelected({ [name]: value });
} }
}; }
onDeleteSelectedPress = () => { onDeleteSelectedPress = () => {
this.setState({ isDeleteBookModalOpen: true }); this.setState({ isDeleteBookModalOpen: true });
}; }
onDeleteBookModalClose = () => { onDeleteBookModalClose = () => {
this.setState({ isDeleteBookModalOpen: false }); this.setState({ isDeleteBookModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -5,5 +5,5 @@
.deleteFilesMessage { .deleteFilesMessage {
margin-top: 20px; margin-top: 20px;
color: var(--dangerColor); color: $dangerColor;
} }

View File

@@ -31,11 +31,11 @@ class DeleteBookModalContent extends Component {
onDeleteFilesChange = ({ value }) => { onDeleteFilesChange = ({ value }) => {
this.setState({ deleteFiles: value }); this.setState({ deleteFiles: value });
}; }
onAddImportListExclusionChange = ({ value }) => { onAddImportListExclusionChange = ({ value }) => {
this.setState({ addImportListExclusion: value }); this.setState({ addImportListExclusion: value });
}; }
onDeleteBookConfirmed = () => { onDeleteBookConfirmed = () => {
const { const {
@@ -45,7 +45,7 @@ class DeleteBookModalContent extends Component {
this.setState({ deleteFiles: false }); this.setState({ deleteFiles: false });
this.props.onDeleteSelectedPress(deleteFiles, addImportListExclusion); this.props.onDeleteSelectedPress(deleteFiles, addImportListExclusion);
}; }
// //
// Render // Render

View File

@@ -97,14 +97,14 @@ class BookIndex extends Component {
setScrollerRef = (ref) => { setScrollerRef = (ref) => {
this.setState({ scroller: ref }); this.setState({ scroller: ref });
}; }
getSelectedIds = () => { getSelectedIds = () => {
if (this.state.allUnselected) { if (this.state.allUnselected) {
return []; return [];
} }
return getSelectedIds(this.state.selectedState); return getSelectedIds(this.state.selectedState);
}; }
setSelectedState() { setSelectedState() {
const { const {
@@ -191,19 +191,19 @@ class BookIndex extends Component {
onPosterOptionsPress = () => { onPosterOptionsPress = () => {
this.setState({ isPosterOptionsModalOpen: true }); this.setState({ isPosterOptionsModalOpen: true });
}; }
onPosterOptionsModalClose = () => { onPosterOptionsModalClose = () => {
this.setState({ isPosterOptionsModalOpen: false }); this.setState({ isPosterOptionsModalOpen: false });
}; }
onOverviewOptionsPress = () => { onOverviewOptionsPress = () => {
this.setState({ isOverviewOptionsModalOpen: true }); this.setState({ isOverviewOptionsModalOpen: true });
}; }
onOverviewOptionsModalClose = () => { onOverviewOptionsModalClose = () => {
this.setState({ isOverviewOptionsModalOpen: false }); this.setState({ isOverviewOptionsModalOpen: false });
}; }
onEditorTogglePress = () => { onEditorTogglePress = () => {
if (this.state.isEditorActive) { if (this.state.isEditorActive) {
@@ -213,55 +213,55 @@ class BookIndex extends Component {
newState.isEditorActive = true; newState.isEditorActive = true;
this.setState(newState); this.setState(newState);
} }
}; }
onJumpBarItemPress = (jumpToCharacter) => { onJumpBarItemPress = (jumpToCharacter) => {
this.setState({ jumpToCharacter }); this.setState({ jumpToCharacter });
}; }
onSelectAllChange = ({ value }) => { onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value)); this.setState(selectAll(this.state.selectedState, value));
}; }
onSelectAllPress = () => { onSelectAllPress = () => {
this.onSelectAllChange({ value: !this.state.allSelected }); this.onSelectAllChange({ value: !this.state.allSelected });
}; }
onSelectedChange = ({ id, value, shiftKey = false }) => { onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => { this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey); return toggleSelected(state, this.props.items, id, value, shiftKey);
}); });
}; }
onSaveSelected = (changes) => { onSaveSelected = (changes) => {
this.props.onSaveSelected({ this.props.onSaveSelected({
bookIds: this.getSelectedIds(), bookIds: this.getSelectedIds(),
...changes ...changes
}); });
}; }
onSearchPress = () => { onSearchPress = () => {
this.setState({ isConfirmSearchModalOpen: true }); this.setState({ isConfirmSearchModalOpen: true });
}; }
onRefreshBookPress = () => { onRefreshBookPress = () => {
const selectedIds = this.getSelectedIds(); const selectedIds = this.getSelectedIds();
const refreshIds = this.state.isEditorActive && selectedIds.length > 0 ? selectedIds : []; const refreshIds = this.state.isEditorActive && selectedIds.length > 0 ? selectedIds : [];
this.props.onRefreshBookPress(refreshIds); this.props.onRefreshBookPress(refreshIds);
}; }
onSearchConfirmed = () => { onSearchConfirmed = () => {
const selectedBookIds = this.getSelectedIds(); const selectedMovieIds = this.getSelectedIds();
const searchIds = this.state.isEditorActive && selectedBookIds.length > 0 ? selectedBookIds : this.props.items.map((m) => m.id); const searchIds = this.state.isMovieEditorActive && selectedMovieIds.length > 0 ? selectedMovieIds : this.props.items.map((m) => m.id);
this.props.onSearchPress(searchIds); this.props.onSearchPress(searchIds);
this.setState({ isConfirmSearchModalOpen: false }); this.setState({ isConfirmSearchModalOpen: false });
}; }
onConfirmSearchModalClose = () => { onConfirmSearchModalClose = () => {
this.setState({ isConfirmSearchModalOpen: false }); this.setState({ isConfirmSearchModalOpen: false });
}; }
// //
// Render // Render

View File

@@ -94,15 +94,15 @@ class BookIndexConnector extends Component {
onViewSelect = (view) => { onViewSelect = (view) => {
this.props.dispatchSetBookView(view); this.props.dispatchSetBookView(view);
}; }
onSaveSelected = (payload) => { onSaveSelected = (payload) => {
this.props.dispatchSaveBookEditor(payload); this.props.dispatchSaveBookEditor(payload);
}; }
onScroll = ({ scrollTop }) => { onScroll = ({ scrollTop }) => {
scrollPositions.bookIndex = scrollTop; scrollPositions.bookIndex = scrollTop;
}; }
// //
// Render // Render

View File

@@ -21,32 +21,32 @@
.continuing { .continuing {
composes: legendItemColor; composes: legendItemColor;
background-color: var(--primaryColor); background-color: $primaryColor;
} }
.ended { .ended {
composes: legendItemColor; composes: legendItemColor;
background-color: var(--successColor); background-color: $successColor;
} }
.missingMonitored { .missingMonitored {
composes: legendItemColor; composes: legendItemColor;
background-color: var(--dangerColor); background-color: $dangerColor;
&:global(.colorImpaired) { &:global(.colorImpaired) {
background: repeating-linear-gradient(90deg, color(#f05050 shade(5%)), color(#f05050 shade(5%)) 5px, color(#f05050 shade(15%)) 5px, color(#f05050 shade(15%)) 10px); background: repeating-linear-gradient(90deg, color($dangerColor shade(5%)), color($dangerColor shade(5%)) 5px, color($dangerColor shade(15%)) 5px, color($dangerColor shade(15%)) 10px);
} }
} }
.missingUnmonitored { .missingUnmonitored {
composes: legendItemColor; composes: legendItemColor;
background-color: var(--warningColor); background-color: $warningColor;
&:global(.colorImpaired) { &:global(.colorImpaired) {
background: repeating-linear-gradient(45deg, #ffa500, #ffa500 5px, color(#ffa500 tint(15%)) 5px, color(#ffa500 tint(15%)) 10px); background: repeating-linear-gradient(45deg, $warningColor, $warningColor 5px, color($warningColor tint(15%)) 5px, color($warningColor tint(15%)) 10px);
} }
} }

View File

@@ -98,14 +98,14 @@ class BookIndexItemConnector extends Component {
name: commandNames.REFRESH_BOOK, name: commandNames.REFRESH_BOOK,
bookId: this.props.id bookId: this.props.id
}); });
}; }
onSearchPress = () => { onSearchPress = () => {
this.props.dispatchExecuteCommand({ this.props.dispatchExecuteCommand({
name: commandNames.BOOK_SEARCH, name: commandNames.BOOK_SEARCH,
bookIds: [this.props.id] bookIds: [this.props.id]
}); });
}; }
// //
// Render // Render

View File

@@ -3,7 +3,7 @@ $hoverScale: 1.05;
.container { .container {
&:hover { &:hover {
.content { .content {
background-color: var(--tableRowHoverBackgroundColor); background-color: $tableRowHoverBackgroundColor;
} }
} }
} }
@@ -35,10 +35,10 @@ $hoverScale: 1.05;
composes: link from '~Components/Link/Link.css'; composes: link from '~Components/Link/Link.css';
display: block; display: block;
color: var(--defaultColor); color: $defaultColor;
&:hover { &:hover {
color: var(--defaultColor); color: $defaultColor;
text-decoration: none; text-decoration: none;
} }
} }
@@ -52,8 +52,8 @@ $hoverScale: 1.05;
height: 0; height: 0;
border-width: 0 25px 25px 0; border-width: 0 25px 25px 0;
border-style: solid; border-style: solid;
border-color: transparent var(--dangerColor) transparent transparent; border-color: transparent $dangerColor transparent transparent;
color: var(--white); color: $white;
} }
.info { .info {

View File

@@ -68,22 +68,22 @@ class BookIndexOverview extends Component {
onEditAuthorPress = () => { onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true }); this.setState({ isEditAuthorModalOpen: true });
}; }
onEditAuthorModalClose = () => { onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false }); this.setState({ isEditAuthorModalOpen: false });
}; }
onDeleteAuthorPress = () => { onDeleteAuthorPress = () => {
this.setState({ this.setState({
isEditAuthorModalOpen: false, isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true isDeleteAuthorModalOpen: true
}); });
}; }
onDeleteAuthorModalClose = () => { onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false }); this.setState({ isDeleteAuthorModalOpen: false });
}; }
onChange = ({ value, shiftKey }) => { onChange = ({ value, shiftKey }) => {
const { const {
@@ -92,7 +92,7 @@ class BookIndexOverview extends Component {
} = this.props; } = this.props;
onSelectedChange({ id, value, shiftKey }); onSelectedChange({ id, value, shiftKey });
}; }
// //
// Render // Render

View File

@@ -123,7 +123,7 @@ class BookIndexOverviews extends Component {
setGridRef = (ref) => { setGridRef = (ref) => {
this._grid = ref; this._grid = ref;
}; }
calculateGrid = (width = this.state.width, isSmallScreen) => { calculateGrid = (width = this.state.width, isSmallScreen) => {
const { const {
@@ -141,7 +141,7 @@ class BookIndexOverviews extends Component {
posterHeight, posterHeight,
rowHeight rowHeight
}); });
}; }
cellRenderer = ({ key, rowIndex, style }) => { cellRenderer = ({ key, rowIndex, style }) => {
const { const {
@@ -196,14 +196,14 @@ class BookIndexOverviews extends Component {
/> />
</div> </div>
); );
}; }
// //
// Listeners // Listeners
onMeasure = ({ width }) => { onMeasure = ({ width }) => {
this.calculateGrid(width, this.props.isSmallScreen); this.calculateGrid(width, this.props.isSmallScreen);
}; }
// //
// Render // Render

View File

@@ -105,7 +105,7 @@ class BookIndexOverviewOptionsModalContent extends Component {
}, () => { }, () => {
this.props.onChangeOverviewOption({ [name]: value }); this.props.onChangeOverviewOption({ [name]: value });
}); });
}; }
// //
// Render // Render

Some files were not shown because too many files have changed in this diff Show More