From ba96dad8c7371cc193b3fea2ae3b12c606aa86fe Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 28 Aug 2018 23:01:02 -0400 Subject: [PATCH] Fixed: UI and Command manager updates Co-Authored-By: Mark McDowall --- .../AddNewArtist/AddNewArtistSearchResult.js | 13 +- .../src/Album/Details/AlbumDetailsMedium.js | 13 +- frontend/src/Album/EpisodeStatus.js | 15 +- frontend/src/AlbumStudio/AlbumStudioRow.js | 11 +- frontend/src/Artist/Details/ArtistDetails.js | 2 + .../src/Artist/Details/ArtistDetailsSeason.js | 13 +- .../Artist/Index/Table/ArtistStatusCell.js | 22 ++- frontend/src/Calendar/Agenda/AgendaEvent.js | 9 +- .../src/Calendar/Day/CalendarDayConnector.js | 7 +- frontend/src/Calendar/Events/CalendarEvent.js | 11 +- frontend/src/Components/Icon.js | 21 ++- .../Page/Sidebar/Messages/Message.js | 3 +- .../InteractiveImportModalContent.css | 1 - .../InteractiveImportModalContent.js | 50 +++--- .../Interactive/InteractiveImportRow.js | 3 + .../Profiles/Quality/QualityProfileItem.js | 3 +- .../Quality/QualityProfileItemGroup.js | 3 +- frontend/src/Store/Actions/calendarActions.js | 5 +- frontend/src/Store/Actions/commandActions.js | 17 +- frontend/src/System/Backup/BackupRow.js | 9 +- frontend/src/System/Status/Health/Health.js | 11 +- .../src/Wanted/CutoffUnmet/CutoffUnmet.js | 5 +- .../CutoffUnmet/CutoffUnmetConnector.js | 2 - frontend/src/Wanted/Missing/Missing.js | 5 +- .../src/Wanted/Missing/MissingConnector.js | 2 - src/Lidarr.Api.V1/Commands/CommandResource.cs | 33 +--- .../Commands/CommandExecutorFixture.cs | 4 +- .../Commands/CommandQueueManagerFixture.cs | 7 +- .../CheckForFinishedDownloadCommand.cs | 4 +- .../Commands/RenameArtistCommand.cs | 1 + .../MediaFiles/Commands/RenameFilesCommand.cs | 5 +- .../TrackImport/Manual/ManualImportCommand.cs | 1 + .../Messaging/Commands/Command.cs | 3 +- .../Messaging/Commands/CommandQueue.cs | 157 ++++++++++++------ .../Messaging/Commands/CommandQueueManager.cs | 59 +++---- .../Music/Commands/BulkMoveArtistCommand.cs | 1 + .../Music/Commands/MoveArtistCommand.cs | 1 + src/NzbDrone.Core/Music/MoveArtistService.cs | 16 +- .../Commands/ApplicationUpdateCommand.cs | 1 + test.sh | 1 + 40 files changed, 298 insertions(+), 252 deletions(-) diff --git a/frontend/src/AddArtist/AddNewArtist/AddNewArtistSearchResult.js b/frontend/src/AddArtist/AddNewArtist/AddNewArtistSearchResult.js index 3496f64d8..46d04833c 100644 --- a/frontend/src/AddArtist/AddNewArtist/AddNewArtistSearchResult.js +++ b/frontend/src/AddArtist/AddNewArtist/AddNewArtistSearchResult.js @@ -116,13 +116,12 @@ class AddNewArtistSearchResult extends Component { { isExistingArtist && - - - + } diff --git a/frontend/src/Album/Details/AlbumDetailsMedium.js b/frontend/src/Album/Details/AlbumDetailsMedium.js index 13dba0642..675ac5954 100644 --- a/frontend/src/Album/Details/AlbumDetailsMedium.js +++ b/frontend/src/Album/Details/AlbumDetailsMedium.js @@ -134,13 +134,12 @@ class AlbumDetailsMedium extends Component { className={styles.expandButton} onPress={this.onExpandPress} > - - - + { !isSmallScreen &&   diff --git a/frontend/src/Album/EpisodeStatus.js b/frontend/src/Album/EpisodeStatus.js index 8dc912f44..9cdbd1923 100644 --- a/frontend/src/Album/EpisodeStatus.js +++ b/frontend/src/Album/EpisodeStatus.js @@ -48,9 +48,10 @@ function EpisodeStatus(props) { if (grabbed) { return ( -
+
); @@ -74,9 +75,10 @@ function EpisodeStatus(props) { if (!airDateUtc) { return ( -
+
); @@ -84,9 +86,10 @@ function EpisodeStatus(props) { if (!monitored) { return ( -
+
); @@ -94,18 +97,20 @@ function EpisodeStatus(props) { if (hasAired) { return ( -
+
); } return ( -
+
); diff --git a/frontend/src/AlbumStudio/AlbumStudioRow.js b/frontend/src/AlbumStudio/AlbumStudioRow.js index 99d12dd4b..e2ed18f12 100644 --- a/frontend/src/AlbumStudio/AlbumStudioRow.js +++ b/frontend/src/AlbumStudio/AlbumStudioRow.js @@ -39,12 +39,11 @@ class AlbumStudioRow extends Component { /> - - - + diff --git a/frontend/src/Artist/Details/ArtistDetails.js b/frontend/src/Artist/Details/ArtistDetails.js index 0aef778e9..25341bb3b 100644 --- a/frontend/src/Artist/Details/ArtistDetails.js +++ b/frontend/src/Artist/Details/ArtistDetails.js @@ -580,7 +580,9 @@ class ArtistDetails extends Component { diff --git a/frontend/src/Artist/Details/ArtistDetailsSeason.js b/frontend/src/Artist/Details/ArtistDetailsSeason.js index 4ec43447b..3df7fca77 100644 --- a/frontend/src/Artist/Details/ArtistDetailsSeason.js +++ b/frontend/src/Artist/Details/ArtistDetailsSeason.js @@ -150,13 +150,12 @@ class ArtistDetailsSeason extends Component {
- - - + { !isSmallScreen && diff --git a/frontend/src/Artist/Index/Table/ArtistStatusCell.js b/frontend/src/Artist/Index/Table/ArtistStatusCell.js index 7ead1d0cf..8b76dc38e 100644 --- a/frontend/src/Artist/Index/Table/ArtistStatusCell.js +++ b/frontend/src/Artist/Index/Table/ArtistStatusCell.js @@ -19,19 +19,17 @@ function ArtistStatusCell(props) { className={className} {...otherProps} > - - - + - - - + ); } diff --git a/frontend/src/Calendar/Agenda/AgendaEvent.js b/frontend/src/Calendar/Agenda/AgendaEvent.js index b450b9382..c869b096c 100644 --- a/frontend/src/Calendar/Agenda/AgendaEvent.js +++ b/frontend/src/Calendar/Agenda/AgendaEvent.js @@ -107,11 +107,10 @@ class AgendaEvent extends Component { { !queueItem && grabbed && - - - + }
diff --git a/frontend/src/Calendar/Day/CalendarDayConnector.js b/frontend/src/Calendar/Day/CalendarDayConnector.js index 30ad0cb61..6206ef4c6 100644 --- a/frontend/src/Calendar/Day/CalendarDayConnector.js +++ b/frontend/src/Calendar/Day/CalendarDayConnector.js @@ -4,15 +4,14 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector'; import CalendarDay from './CalendarDay'; function createCalendarEventsConnector() { return createSelector( (state, { date }) => date, - createClientSideCollectionSelector('calendar'), - (date, calendar) => { - const filtered = _.filter(calendar.items, (item) => { + (state) => state.calendar.items, + (date, items) => { + const filtered = _.filter(items, (item) => { return moment(date).isSame(moment(item.releaseDate), 'day'); }); diff --git a/frontend/src/Calendar/Events/CalendarEvent.js b/frontend/src/Calendar/Events/CalendarEvent.js index f664879ab..0189fce3d 100644 --- a/frontend/src/Calendar/Events/CalendarEvent.js +++ b/frontend/src/Calendar/Events/CalendarEvent.js @@ -91,12 +91,11 @@ class CalendarEvent extends Component { { !queueItem && grabbed && - - - + }
diff --git a/frontend/src/Components/Icon.js b/frontend/src/Components/Icon.js index 13daccf5d..42a808e20 100644 --- a/frontend/src/Components/Icon.js +++ b/frontend/src/Components/Icon.js @@ -7,6 +7,7 @@ import styles from './Icon.css'; function Icon(props) { const { + containerClassName, className, name, kind, @@ -16,11 +17,7 @@ function Icon(props) { ...otherProps } = props; - if (title && !window.Lidarr.isProduction) { - console.error('Icons cannot have a title'); - } - - return ( + const icon = ( ); + + if (title) { + return ( + + {icon} + + ); + } + + return icon; } Icon.propTypes = { + containerClassName: PropTypes.string, className: PropTypes.string, name: PropTypes.object.isRequired, kind: PropTypes.string.isRequired, diff --git a/frontend/src/Components/Page/Sidebar/Messages/Message.js b/frontend/src/Components/Page/Sidebar/Messages/Message.js index b905ce658..bb7a027fa 100644 --- a/frontend/src/Components/Page/Sidebar/Messages/Message.js +++ b/frontend/src/Components/Page/Sidebar/Messages/Message.js @@ -45,9 +45,10 @@ function Message(props) { styles[type] )} > -
+
diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.css b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.css index 88b4e6178..5bad6c050 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.css +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.css @@ -6,7 +6,6 @@ .filterText { margin-left: 5px; - font-size: $largeFontSize; } .footer { diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js index 3a2a9f862..2ec60c549 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js @@ -169,7 +169,9 @@ class InteractiveImportModalContent extends Component { render() { const { downloadId, + allowArtistChange, showFilterExistingFiles, + showImportMode, filterExistingFiles, title, folder, @@ -211,17 +213,7 @@ class InteractiveImportModalContent extends Component { { - isFetching && - - } - - { - error && -
{errorMessage}
- } - - { - isPopulated && showFilterExistingFiles && !isFetching && + showFilterExistingFiles &&
@@ -258,6 +250,16 @@ class InteractiveImportModalContent extends Component {
} + { + isFetching && + + } + + { + error && +
{errorMessage}
+ } + { isPopulated && !!items.length && !isFetching && !isFetching && @@ -295,9 +298,9 @@ class InteractiveImportModalContent extends Component { - { - !downloadId && -
+
+ { + !downloadId && showImportMode && -
- } + } +
-
- +
+ { + allowArtistChange && + + }