Compare commits

...

37 Commits

Author SHA1 Message Date
Qstick bc7bf6b269 Fixed: Ignore deleted books won't save
Fixes #1505
2023-02-02 22:11:58 -06:00
Qstick 01b4ee1a02 Fixed: Search selected searches all
Fixes #2155
2023-02-02 21:35:01 -06:00
Qstick 3825ecd393 Fixed: Manual Import Reprocessing 2023-01-24 11:51:34 -06:00
Qstick bc63587428 New: Add support for Simplepush notifications
Closes #1989
Closes #1990

Co-Authored-By: Timm Schäuble <Timm.Schaeuble@gmail.com>
(cherry picked from commit 4c7df31070fbd370b26dbcc07131f21eb88d35fc)
2023-01-24 11:51:34 -06:00
Qstick 1caa49c895 Update UI Packages
Align with Lidarr
2023-01-24 11:51:34 -06:00
Qstick fbdc9f3a13 New: OnApplicationUpdate Notifications
Fixes #1422

(cherry picked from commit 9e175e28efcfc6ac3e414649b955a10fb0e951e7)
2023-01-24 11:51:34 -06:00
Qstick f5847e9e5b New: Show previously installed version in Updates UI
Closes #308
Closes #309
Closes #313
Closes #319
Closes #460
Closes #608

Co-Authored-By: Taloth <Taloth@users.noreply.github.com>
2023-01-24 11:51:34 -06:00
Qstick 874b4fc401 New: Ignore #recycle folders (Synology Recycle bin folder)
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2023-01-24 11:51:34 -06:00
Qstick ec75aa6378 Bump Npgsql to 6.0.8 2023-01-23 21:37:27 -06:00
Qstick 31aaec4b10 Don't block task queue for queued update task when long running tasks queued
Fixes #1818

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2023-01-23 21:28:05 -06:00
Qstick 6199cb2999 Fixed: Schedule refresh and process monitored download tasks at high priority
Fixes #1542
Fixes #1553
Fixes #1537
2023-01-23 21:27:36 -06:00
Qstick adb22868b6 New: Description for indexer RSS setting
Fixes #2098
2023-01-23 21:21:22 -06:00
Qstick 20cf7c1ffc Fix RootFolder logs in DiskScanService 2023-01-23 21:17:35 -06:00
Mark McDowall 13fd31b67d New: Improved messaging when qBittorrent fails due to host header rejection
Closes #2099
Closes #2100

(cherry picked from commit 48b4cc5f3ffa0cb8eea6748db9091267216cef4f)
2023-01-23 21:14:35 -06:00
Zak Saunders 95dbfb6e4a Fixed: Progress bar text colour in Dark theme
Closes #2091

(cherry picked from commit ca61efa57fc04a7f6753aedb4b8044d17e345429)
2023-01-23 21:13:18 -06:00
Qstick 31c8092960 New: Author name first character renaming token
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2023-01-23 21:11:04 -06:00
Qstick 06fbd5f93d New: Reset Quality Definitions to default
Closes #1719

(cherry picked from commit d5fff15f32fdb49768dcadd94c760678e650c884)
2023-01-23 21:04:51 -06:00
Qstick 44c37b3f47 Update DeploymentInfoProvider.cs 2023-01-23 21:02:07 -06:00
Qstick 5726df841c Fixed: Logging when series folder is moved successfully
Closes #1764

Co-Authored-By: David Newhall <2402929+davidnewhall@users.noreply.github.com>
2023-01-23 20:42:11 -06:00
Alan Collins 590b203bb6 Adjusted the Windows LongPath support check for valid segment lengths
Closes #1512

(cherry picked from commit 52c6bc5549ab998ccc018d138c55f8f924eed6d3)
2023-01-23 20:40:03 -06:00
Qstick 9982df9d2b Bump Sentry to 3.25.0
Closes #1978
2023-01-23 20:37:47 -06:00
Qstick d1741c8b75 API Updates
Fixes #2011
Fixes #1376
Fixes #1379

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2023-01-23 20:33:02 -06:00
Mark McDowall 20a477f95d Fixed: Only log /proc/mounts exception once per process
Closes #2080

(cherry picked from commit ce0388ca99b7f89bd9e8971777a7995c4361d268)
2023-01-23 20:28:27 -06:00
Qstick e346eb6c64 Update coverlet.runsettings 2023-01-23 20:27:01 -06:00
Lewis England 49710b8863 fix: add end date to calendar events 2023-01-23 20:24:56 -06:00
Qstick 2699f7c0d7 Fixed: Use route Id for PUT requests if not passed in body
Closes #1994
2023-01-23 20:16:38 -06:00
Zak Saunders ed1b29f8e4 New: Auto theme option to match OS theme
Closes #2022

Co-authored-by: Qstick <qstick@gmail.com>
(cherry picked from commit 4ca5a213fa0fc29ed93e7e31b080728d6fa7f1f3)
2023-01-23 20:15:38 -06:00
Mark McDowall 8a4d309d57 New: IPv6 support for connections/indexers/download clients
Closes #2026

(cherry picked from commit 1b90fbcf7df2c1086da4791c6491771924b1b7aa)
2023-01-23 20:12:49 -06:00
Mark McDowall 7dc061cc8a Fixed: Improve Bind Address validation and help text
Closes #2025

(cherry picked from commit 6bdeafcf8c78e145595f52e885356be1210abe91)
2023-01-23 20:12:49 -06:00
Qstick cef06d11a5 Bump Newtonsoft to 13.0.2 2023-01-23 20:12:49 -06:00
bakerboy448 9235ae85bc Fixed: Improve RarBG Error Handling
Closes #1883
Closes #1884

(cherry picked from commit 7cd38bba841659a595fe4a0e14c478fc4e4047b1)
2023-01-23 20:12:33 -06:00
Mark McDowall b123952010 Fixed: Grab/remove queue actions not showing spinner
Closes #2002

(cherry picked from commit 51b1ba13c1b9dc9e26469c728e3871d4b7da0788)
2023-01-23 20:11:29 -06:00
Qstick e62d00103d Simplify X-Forwarded-For handling
This happens in asp.net middleware now

Closes #2033
Closes #2034

(cherry picked from commit 16e2d130e6a2e7239bcfe92187a7f990f93eff00)
Co-Authored-By: ta264 <ta264@users.noreply.github.com>
2023-01-23 20:11:29 -06:00
Qstick 13dad33e31 New: Improve IPAddress.IsLocal method
Closes #2032

(cherry picked from commit fd98a179ab6fed8037c99344b34593aac24a0ac0)
Co-Authored-By: ta264 <ta264@users.noreply.github.com>
2023-01-23 20:11:12 -06:00
Qstick be8e50a41f Fixed: Avoid Sqlite Error when all profiles have lowest quality cutoff
Closes #2147
Fixes #1911

(cherry picked from commit f05e109b50cca496e7b42e2833eff161a43e12f4)
2023-01-22 23:14:27 -06:00
Zak Saunders 6e38df366f New: Darkmode
* New: Native Theme Engine

Co-Authored-By: Zak Saunders <thezak48@users.noreply.github.com>
(cherry picked from commit 2291f3e00eb2ff9268a0b2f49da8dde82ee13c04)

* Update CSS for themes

* Fixup CSS values

* Fixup remove duped Color-Impaired setting

* Fixup Link Colors

Co-Authored-By: Qstick <qstick@gmail.com>
2023-01-21 18:18:48 -06:00
PearsonFlyer 91b8565629 Fix notifiation in Ntfy on test from Radarr to Readarr (#2141) 2023-01-21 17:35:49 -06:00
596 changed files with 6681 additions and 4790 deletions
-1
View File
@@ -1,7 +1,6 @@
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',
+6 -6
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
@@ -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
@@ -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
@@ -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
+2 -2
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
@@ -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
@@ -1,13 +1,13 @@
.torrent { .torrent {
composes: label from '~Components/Label.css'; composes: label from '~Components/Label.css';
border-color: $torrentColor; border-color: var(--torrentColor);
background-color: $torrentColor; background-color: var(--torrentColor);
} }
.usenet { .usenet {
composes: label from '~Components/Label.css'; composes: label from '~Components/Label.css';
border-color: $usenetColor; border-color: var(--usenetColor);
background-color: $usenetColor; background-color: var(--usenetColor);
} }
+31 -17
View File
@@ -75,13 +75,23 @@ 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) {
this.setState({ isPendingSelected }); nextState.isPendingSelected = isPendingSelected;
}
if (!_.isEmpty(nextState)) {
this.setState(nextState);
} }
} }
@@ -90,45 +100,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
@@ -216,26 +226,29 @@ 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}
@@ -270,7 +283,8 @@ class Queue extends Component {
isFetching={isRefreshing} isFetching={isRefreshing}
{...otherProps} {...otherProps}
/> />
</div> </div> :
null
} }
</PageContentBody> </PageContentBody>
+11 -11
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
+1 -1
View File
@@ -42,7 +42,7 @@ class QueueOptions extends Component {
[name]: value [name]: value
}); });
}); });
} };
// //
// Render // Render
+5 -5
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
@@ -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
@@ -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
@@ -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
+6 -3
View File
@@ -4,6 +4,7 @@ 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 }) {
@@ -11,9 +12,11 @@ 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}>
<PageConnector> <ApplyTheme>
<AppRoutes app={App} /> <PageConnector>
</PageConnector> <AppRoutes app={App} />
</PageConnector>
</ApplyTheme>
</ConnectedRouter> </ConnectedRouter>
</Provider> </Provider>
</DocumentTitle> </DocumentTitle>
+2 -2
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 Quality from 'Settings/Quality/Quality'; import QualityConnector from 'Settings/Quality/QualityConnector';
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={Quality} component={QualityConnector}
/> />
<Route <Route
+40 -1
View File
@@ -11,9 +11,47 @@ 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,
@@ -21,7 +59,7 @@ function AppUpdatedModalContent(props) {
onModalClose onModalClose
} = props; } = props;
const update = items[0]; const update = mergeUpdates(items, version, prevVersion);
return ( return (
<ModalContent onModalClose={onModalClose}> <ModalContent onModalClose={onModalClose}>
@@ -91,6 +129,7 @@ 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,
@@ -8,8 +8,9 @@ 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, updates) => { (version, prevVersion, updates) => {
const { const {
isPopulated, isPopulated,
error, error,
@@ -18,6 +19,7 @@ function createMapStateToProps() {
return { return {
version, version,
prevVersion,
isPopulated, isPopulated,
error, error,
items items
+49
View File
@@ -0,0 +1,49 @@
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);
+2 -2
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
@@ -8,5 +8,5 @@
.deleteFilesMessage { .deleteFilesMessage {
margin-top: 20px; margin-top: 20px;
color: $dangerColor; color: var(--dangerColor);
} }
@@ -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
@@ -32,7 +32,7 @@ class DeleteAuthorModalContentConnector extends Component {
}); });
this.props.onModalClose(true); this.props.onModalClose(true);
} };
// //
// Render // Render
@@ -9,7 +9,7 @@
} }
.metadataMessage { .metadataMessage {
color: $helpTextColor; color: var(--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 $lightGray; border-bottom: 1px solid var(--lightGray);
} }
.tab { .tab {
@@ -37,7 +37,7 @@
} }
.selectedTab { .selectedTab {
border-bottom: 4px solid $linkColor; border-bottom: 4px solid var(--linkColor);
} }
.tabContent { .tabContent {
@@ -63,7 +63,7 @@
white-space: nowrap; white-space: nowrap;
&:hover { &:hover {
color: $iconButtonHoverLightColor; color: var(--iconButtonHoverLightColor);
} }
} }
+22 -22
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
@@ -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
@@ -16,7 +16,7 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: $black; background: var(--black);
opacity: 0.7; opacity: 0.7;
} }
@@ -25,7 +25,7 @@
padding: 30px; padding: 30px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: $white; color: var(--white);
} }
.poster { .poster {
@@ -69,7 +69,7 @@
width: 40px; width: 40px;
&:hover { &:hover {
color: $iconButtonHoverLightColor; color: var(--iconButtonHoverLightColor);
} }
} }
@@ -97,7 +97,7 @@
white-space: nowrap; white-space: nowrap;
&:hover { &:hover {
color: $iconButtonHoverLightColor; color: var(--iconButtonHoverLightColor);
} }
} }
@@ -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
@@ -48,7 +48,7 @@ class AuthorDetailsHeaderConnector extends Component {
authorId: this.props.authorId, authorId: this.props.authorId,
monitored monitored
}); });
} };
// //
// Render // Render
@@ -1,8 +1,8 @@
.bookType { .bookType {
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid $borderColor; border: 1px solid var(--borderColor);
border-radius: 4px; border-radius: 4px;
background-color: $white; background-color: var(--cardBackgroundColor);
&: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 $borderColor; border-top: 1px solid var(--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 $borderColor; border-top: 1px solid var(--borderColor);
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
background-color: #fafafa; background-color: var(--collapseButtonBackgroundColor);
} }
.collapseButtonIcon { .collapseButtonIcon {
@@ -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
@@ -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
@@ -1,8 +1,8 @@
.bookType { .bookType {
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid $borderColor; border: 1px solid var(--borderColor);
border-radius: 4px; border-radius: 4px;
background-color: $white; background-color: var(--cardBackgroundColor);
&: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 $borderColor; border-top: 1px solid var(--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 $borderColor; border-top: 1px solid var(--borderColor);
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
background-color: #fafafa; background-color: var(--cardBackgroundColor);
} }
.collapseButtonIcon { .collapseButtonIcon {
@@ -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
@@ -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
+5 -5
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -45,7 +45,7 @@ class RetagAuthorModalContentConnector extends Component {
}); });
this.props.onModalClose(true); this.props.onModalClose(true);
} };
// //
// Render // Render
@@ -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
@@ -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
@@ -9,5 +9,5 @@
.path { .path {
margin-left: 5px; margin-left: 5px;
color: $dangerColor; color: var(--dangerColor);
} }
@@ -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
@@ -43,7 +43,7 @@ class OrganizeAuthorModalContentConnector extends Component {
}); });
this.props.onModalClose(true); this.props.onModalClose(true);
} };
// //
// Render // Render
@@ -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
@@ -54,7 +54,7 @@ class AuthorHistoryContentConnector extends Component {
authorId, authorId,
bookId bookId
}); });
} };
// //
// Render // Render
@@ -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
+17 -17
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
@@ -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
@@ -21,32 +21,32 @@
.continuing { .continuing {
composes: legendItemColor; composes: legendItemColor;
background-color: $primaryColor; background-color: var(--primaryColor);
} }
.ended { .ended {
composes: legendItemColor; composes: legendItemColor;
background-color: $successColor; background-color: var(--successColor);
} }
.missingMonitored { .missingMonitored {
composes: legendItemColor; composes: legendItemColor;
background-color: $dangerColor; background-color: var(--dangerColor);
&:global(.colorImpaired) { &:global(.colorImpaired) {
background: repeating-linear-gradient(90deg, color($dangerColor shade(5%)), color($dangerColor shade(5%)) 5px, color($dangerColor shade(15%)) 5px, color($dangerColor shade(15%)) 10px); background: repeating-linear-gradient(90deg, color(#f05050 shade(5%)), color(#f05050 shade(5%)) 5px, color(#f05050 shade(15%)) 5px, color(#f05050 shade(15%)) 10px);
} }
} }
.missingUnmonitored { .missingUnmonitored {
composes: legendItemColor; composes: legendItemColor;
background-color: $warningColor; background-color: var(--warningColor);
&:global(.colorImpaired) { &:global(.colorImpaired) {
background: repeating-linear-gradient(45deg, $warningColor, $warningColor 5px, color($warningColor tint(15%)) 5px, color($warningColor tint(15%)) 10px); background: repeating-linear-gradient(45deg, #ffa500, #ffa500 5px, color(#ffa500 tint(15%)) 5px, color(#ffa500 tint(15%)) 10px);
} }
} }
@@ -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
@@ -3,7 +3,7 @@ $hoverScale: 1.05;
.container { .container {
&:hover { &:hover {
.content { .content {
background-color: $tableRowHoverBackgroundColor; background-color: var(--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: $defaultColor; color: var(--defaultColor);
&:hover { &:hover {
color: $defaultColor; color: var(--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 $dangerColor transparent transparent; border-color: transparent var(--dangerColor) transparent transparent;
color: $white; color: var(--white);
} }
.info { .info {
@@ -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
@@ -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
@@ -122,7 +122,7 @@ class AuthorIndexOverviewOptionsModalContent extends Component {
}, () => { }, () => {
this.props.onChangeOverviewOption({ [name]: value }); this.props.onChangeOverviewOption({ [name]: value });
}); });
} };
// //
// Render // Render
@@ -5,7 +5,7 @@ $hoverScale: 1.05;
&:hover { &:hover {
z-index: 2; z-index: 2;
box-shadow: 0 0 12px $black; box-shadow: 0 0 12px var(--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: $defaultColor; background-color: var(--defaultColor);
} }
.overlayTitle { .overlayTitle {
@@ -45,13 +45,13 @@ $hoverScale: 1.05;
padding: 5px; padding: 5px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: $offWhite; color: var(--offWhite);
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
} }
.nextAiring { .nextAiring {
background-color: #fafbfc; background-color: var(--seriesBackgroundColor);
text-align: center; text-align: center;
font-size: $smallFontSize; font-size: $smallFontSize;
} }
@@ -59,8 +59,7 @@ $hoverScale: 1.05;
.title { .title {
@add-mixin truncate; @add-mixin truncate;
background-color: $defaultColor; background-color: var(--seriesBackgroundColor);
color: $white;
text-align: center; text-align: center;
font-size: $smallFontSize; font-size: $smallFontSize;
} }
@@ -74,8 +73,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 $dangerColor transparent transparent; border-color: transparent var(--dangerColor) transparent transparent;
color: $white; color: var(--white);
} }
.editorSelect { .editorSelect {
@@ -91,8 +90,8 @@ $hoverScale: 1.05;
left: 10px; left: 10px;
z-index: 3; z-index: 3;
border-radius: 4px; border-radius: 4px;
background-color: $themeLightColor; background-color: var(--readarrRed);
color: $white; color: var(--white);
font-size: $smallFontSize; font-size: $smallFontSize;
opacity: 0; opacity: 0;
transition: opacity 0; transition: opacity 0;
@@ -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
@@ -1,5 +1,5 @@
.info { .info {
background-color: #fafbfc; background-color: var(--seriesBackgroundColor);
text-align: center; text-align: center;
font-size: $smallFontSize; font-size: $smallFontSize;
} }
@@ -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
@@ -93,7 +93,7 @@ class AuthorIndexPosterOptionsModalContent extends Component {
}, () => { }, () => {
this.props.onChangePosterOption({ [name]: value }); this.props.onChangePosterOption({ [name]: value });
}); });
} };
// //
// Render // Render
@@ -3,7 +3,7 @@
border-radius: 0; border-radius: 0;
background-color: #5b5b5b; background-color: #5b5b5b;
color: $white; color: var(--white);
transition: width 200ms ease; transition: width 200ms ease;
} }
@@ -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
@@ -31,7 +31,7 @@
position: relative; position: relative;
display: block; display: block;
height: 70px; height: 70px;
background-color: $defaultColor; background-color: var(--defaultColor);
} }
.bannerImage { .bannerImage {
@@ -49,7 +49,7 @@
padding: 5px; padding: 5px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: $offWhite; color: var(--offWhite);
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
} }
@@ -92,7 +92,7 @@
} }
.ratings { .ratings {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; composes: cell from '~Components/Table/Cells/VirtualTableRowCell.css';
flex: 0 0 80px; flex: 0 0 80px;
} }
@@ -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
@@ -78,7 +78,7 @@ class AuthorIndexTable extends Component {
/> />
</VirtualTableRow> </VirtualTableRow>
); );
} };
// //
// Render // Render
@@ -60,7 +60,7 @@ class AuthorIndexTableOptions extends Component {
} }
}); });
}); });
} };
// //
// Render // Render
@@ -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
@@ -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
@@ -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
+2 -2
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
+1 -1
View File
@@ -2,7 +2,7 @@
composes: link from '~Components/Link/Link.css'; composes: link from '~Components/Link/Link.css';
&:hover { &:hover {
color: $linkHoverColor; color: var(--linkHoverColor);
text-decoration: underline; text-decoration: underline;
} }
} }
@@ -8,5 +8,5 @@
.deleteFilesMessage { .deleteFilesMessage {
margin-top: 20px; margin-top: 20px;
color: $dangerColor; color: var(--dangerColor);
} }
@@ -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
@@ -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
+3 -3
View File
@@ -9,7 +9,7 @@
.tabList { .tabList {
margin: 0; margin: 0;
padding: 0; padding: 0;
border-bottom: 1px solid $lightGray; border-bottom: 1px solid var(--lightGray);
} }
.tab { .tab {
@@ -24,7 +24,7 @@
} }
.selectedTab { .selectedTab {
border-bottom: 4px solid $linkColor; border-bottom: 4px solid var(--linkColor);
} }
.tabContent { .tabContent {
@@ -54,7 +54,7 @@
white-space: nowrap; white-space: nowrap;
&:hover { &:hover {
color: $iconButtonHoverLightColor; color: var(--iconButtonHoverLightColor);
} }
} }
+9 -9
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
@@ -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
@@ -16,7 +16,7 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: $black; background: var(--black);
opacity: 0.7; opacity: 0.7;
} }
@@ -25,7 +25,7 @@
padding: 30px; padding: 30px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: $white; color: var(--white);
} }
.cover { .cover {
@@ -69,7 +69,7 @@
width: 40px; width: 40px;
&:hover { &:hover {
color: $iconButtonHoverLightColor; color: var(--iconButtonHoverLightColor);
} }
} }
@@ -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
@@ -48,7 +48,7 @@ class BookDetailsHeaderConnector extends Component {
bookIds: [this.props.bookId], bookIds: [this.props.bookId],
monitored monitored
}); });
} };
// //
// Render // Render
@@ -64,7 +64,7 @@ class BookDetailsPageConnector extends Component {
populate = () => { populate = () => {
this.setState({ hasMounted: true }); this.setState({ hasMounted: true });
} };
// //
// Render // Render
@@ -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
@@ -27,7 +27,7 @@ class EditBookModalContent extends Component {
onSavePress(false); onSavePress(false);
} };
// //
// Render // Render
@@ -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
+3 -3
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
@@ -5,5 +5,5 @@
.deleteFilesMessage { .deleteFilesMessage {
margin-top: 20px; margin-top: 20px;
color: $dangerColor; color: var(--dangerColor);
} }
@@ -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
+18 -18
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 selectedMovieIds = this.getSelectedIds(); const selectedBookIds = this.getSelectedIds();
const searchIds = this.state.isMovieEditorActive && selectedMovieIds.length > 0 ? selectedMovieIds : this.props.items.map((m) => m.id); const searchIds = this.state.isEditorActive && selectedBookIds.length > 0 ? selectedBookIds : 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
@@ -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
+6 -6
View File
@@ -21,32 +21,32 @@
.continuing { .continuing {
composes: legendItemColor; composes: legendItemColor;
background-color: $primaryColor; background-color: var(--primaryColor);
} }
.ended { .ended {
composes: legendItemColor; composes: legendItemColor;
background-color: $successColor; background-color: var(--successColor);
} }
.missingMonitored { .missingMonitored {
composes: legendItemColor; composes: legendItemColor;
background-color: $dangerColor; background-color: var(--dangerColor);
&:global(.colorImpaired) { &:global(.colorImpaired) {
background: repeating-linear-gradient(90deg, color($dangerColor shade(5%)), color($dangerColor shade(5%)) 5px, color($dangerColor shade(15%)) 5px, color($dangerColor shade(15%)) 10px); background: repeating-linear-gradient(90deg, color(#f05050 shade(5%)), color(#f05050 shade(5%)) 5px, color(#f05050 shade(15%)) 5px, color(#f05050 shade(15%)) 10px);
} }
} }
.missingUnmonitored { .missingUnmonitored {
composes: legendItemColor; composes: legendItemColor;
background-color: $warningColor; background-color: var(--warningColor);
&:global(.colorImpaired) { &:global(.colorImpaired) {
background: repeating-linear-gradient(45deg, $warningColor, $warningColor 5px, color($warningColor tint(15%)) 5px, color($warningColor tint(15%)) 10px); background: repeating-linear-gradient(45deg, #ffa500, #ffa500 5px, color(#ffa500 tint(15%)) 5px, color(#ffa500 tint(15%)) 10px);
} }
} }
@@ -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
@@ -3,7 +3,7 @@ $hoverScale: 1.05;
.container { .container {
&:hover { &:hover {
.content { .content {
background-color: $tableRowHoverBackgroundColor; background-color: var(--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: $defaultColor; color: var(--defaultColor);
&:hover { &:hover {
color: $defaultColor; color: var(--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 $dangerColor transparent transparent; border-color: transparent var(--dangerColor) transparent transparent;
color: $white; color: var(--white);
} }
.info { .info {
@@ -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
@@ -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
@@ -105,7 +105,7 @@ class BookIndexOverviewOptionsModalContent extends Component {
}, () => { }, () => {
this.props.onChangeOverviewOption({ [name]: value }); this.props.onChangeOverviewOption({ [name]: value });
}); });
} };
// //
// Render // Render
@@ -5,7 +5,7 @@ $hoverScale: 1.05;
&:hover { &:hover {
z-index: 2; z-index: 2;
box-shadow: 0 0 12px $black; box-shadow: 0 0 12px var(--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: $defaultColor; background-color: var(--cardBackgroundColor);
} }
.overlayTitle { .overlayTitle {
@@ -45,7 +45,7 @@ $hoverScale: 1.05;
padding: 5px; padding: 5px;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: $offWhite; color: var(--cardBackgroundColor);
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
} }
@@ -59,8 +59,8 @@ $hoverScale: 1.05;
.title { .title {
@add-mixin truncate; @add-mixin truncate;
background-color: $defaultColor; background-color: var(--cardBackgroundColor);
color: $white; color: var(--textColor);
text-align: center; text-align: center;
font-size: $smallFontSize; font-size: $smallFontSize;
} }
@@ -74,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 $dangerColor transparent transparent; border-color: transparent var(--dangerColor) transparent transparent;
color: $white; color: var(--textColor);
} }
.editorSelect { .editorSelect {
@@ -91,8 +91,8 @@ $hoverScale: 1.05;
left: 10px; left: 10px;
z-index: 3; z-index: 3;
border-radius: 4px; border-radius: 4px;
background-color: $themeLightColor; background-color: var(--readarrRed);
color: $white; color: var(--white);
font-size: $smallFontSize; font-size: $smallFontSize;
opacity: 0; opacity: 0;
transition: opacity 0; transition: opacity 0;
@@ -37,42 +37,42 @@ class BookIndexPoster 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 });
} };
onEditBookPress = () => { onEditBookPress = () => {
this.setState({ isEditBookModalOpen: true }); this.setState({ isEditBookModalOpen: true });
} };
onEditBookModalClose = () => { onEditBookModalClose = () => {
this.setState({ isEditBookModalOpen: false }); this.setState({ isEditBookModalOpen: 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 {
@@ -81,7 +81,7 @@ class BookIndexPoster extends Component {
} = this.props; } = this.props;
onSelectedChange({ id, value, shiftKey }); onSelectedChange({ id, value, shiftKey });
} };
// //
// Render // Render

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