From c7d17598e232111d947ca2990f062f92ef775abd Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 18 Nov 2018 22:57:29 -0500 Subject: [PATCH] Fixed: Change Unreleased Color, Add Partial Status Fixes #527 --- frontend/src/Calendar/Agenda/AgendaEvent.css | 4 ++++ frontend/src/Calendar/Events/CalendarEvent.css | 6 +++++- frontend/src/Calendar/Events/CalendarEvent.js | 3 --- frontend/src/Calendar/Legend/Legend.js | 10 ++++++++-- frontend/src/Calendar/Legend/LegendItem.css | 4 ++++ frontend/src/Calendar/getStatusStyle.js | 4 ++++ frontend/src/Styles/Variables/colors.js | 2 ++ 7 files changed, 27 insertions(+), 6 deletions(-) diff --git a/frontend/src/Calendar/Agenda/AgendaEvent.css b/frontend/src/Calendar/Agenda/AgendaEvent.css index 516172841..d01be1954 100644 --- a/frontend/src/Calendar/Agenda/AgendaEvent.css +++ b/frontend/src/Calendar/Agenda/AgendaEvent.css @@ -58,6 +58,10 @@ composes: downloaded from 'Calendar/Events/CalendarEvent.css'; } +.partial { + composes: partial from 'Calendar/Events/CalendarEvent.css'; +} + .downloading { composes: downloading from 'Calendar/Events/CalendarEvent.css'; } diff --git a/frontend/src/Calendar/Events/CalendarEvent.css b/frontend/src/Calendar/Events/CalendarEvent.css index c30f3562e..03ce086b9 100644 --- a/frontend/src/Calendar/Events/CalendarEvent.css +++ b/frontend/src/Calendar/Events/CalendarEvent.css @@ -41,6 +41,10 @@ border-left-color: $successColor; } +.partial { + border-left-color: $yellow; +} + .downloading { border-left-color: $purple; } @@ -62,7 +66,7 @@ } .unreleased { - border-left-color: $primaryColor; + border-left-color: $blue; &:global(.colorImpaired) { background: repeating-linear-gradient(90deg, transparent, transparent 5px, #eee 5px, #eee 10px); diff --git a/frontend/src/Calendar/Events/CalendarEvent.js b/frontend/src/Calendar/Events/CalendarEvent.js index 16cd591af..b104d5cee 100644 --- a/frontend/src/Calendar/Events/CalendarEvent.js +++ b/frontend/src/Calendar/Events/CalendarEvent.js @@ -122,9 +122,6 @@ CalendarEvent.propTypes = { title: PropTypes.string.isRequired, foreignAlbumId: PropTypes.string.isRequired, statistics: PropTypes.object.isRequired, - // seasonNumber: PropTypes.number.isRequired, - // episodeNumber: PropTypes.number.isRequired, - // absoluteEpisodeNumber: PropTypes.number, releaseDate: PropTypes.string.isRequired, monitored: PropTypes.bool.isRequired, grabbed: PropTypes.bool, diff --git a/frontend/src/Calendar/Legend/Legend.js b/frontend/src/Calendar/Legend/Legend.js index 759ebf5a7..8ab94d032 100644 --- a/frontend/src/Calendar/Legend/Legend.js +++ b/frontend/src/Calendar/Legend/Legend.js @@ -28,8 +28,8 @@ function Legend({ colorImpairedMode }) { /> @@ -40,6 +40,12 @@ function Legend({ colorImpairedMode }) { tooltip="Album is unmonitored" colorImpairedMode={colorImpairedMode} /> + + ); diff --git a/frontend/src/Calendar/Legend/LegendItem.css b/frontend/src/Calendar/Legend/LegendItem.css index fb49d8608..9145ae912 100644 --- a/frontend/src/Calendar/Legend/LegendItem.css +++ b/frontend/src/Calendar/Legend/LegendItem.css @@ -16,6 +16,10 @@ composes: downloaded from 'Calendar/Events/CalendarEvent.css'; } +.partial { + composes: partial from 'Calendar/Events/CalendarEvent.css'; +} + .downloading { composes: downloading from 'Calendar/Events/CalendarEvent.css'; } diff --git a/frontend/src/Calendar/getStatusStyle.js b/frontend/src/Calendar/getStatusStyle.js index 50ea3f64a..c02ae0ee5 100644 --- a/frontend/src/Calendar/getStatusStyle.js +++ b/frontend/src/Calendar/getStatusStyle.js @@ -8,6 +8,10 @@ function getStatusStyle(episodeNumber, downloading, startTime, isMonitored, perc return 'downloaded'; } + if (percentOfTracks > 0) { + return 'partial'; + } + if (downloading) { return 'downloading'; } diff --git a/frontend/src/Styles/Variables/colors.js b/frontend/src/Styles/Variables/colors.js index ec68adc81..2592b8a71 100644 --- a/frontend/src/Styles/Variables/colors.js +++ b/frontend/src/Styles/Variables/colors.js @@ -6,6 +6,8 @@ module.exports = { dimColor: '#555', black: '#000', white: '#fff', + blue: '#06f', + yellow: '#FFA500', primaryColor: '#0b8750', selectedColor: '#f9be03', successColor: '#27c24c',