From 2d09fdba15e1ca5ca72ab8cbba5d2d3a3d0035d0 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 23 Aug 2014 10:43:25 -0700 Subject: [PATCH] New: Unaired premieres on calendar are displayed in pink --- src/UI/Calendar/CalendarLayoutTemplate.html | 1 + src/UI/Calendar/CalendarView.js | 4 ++++ src/UI/Calendar/calendar.less | 9 +++++++++ src/UI/Content/variables.less | 9 +++++---- src/UI/Handlebars/Helpers/Episode.js | 4 ++++ 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/UI/Calendar/CalendarLayoutTemplate.html b/src/UI/Calendar/CalendarLayoutTemplate.html index f531ba3aa..b99b0fe90 100644 --- a/src/UI/Calendar/CalendarLayoutTemplate.html +++ b/src/UI/Calendar/CalendarLayoutTemplate.html @@ -14,6 +14,7 @@
    +
  • Unaired Premiere
  • Unaired
  • On Air
  • Downloading
  • diff --git a/src/UI/Calendar/CalendarView.js b/src/UI/Calendar/CalendarView.js index bf147770f..221ef4085 100644 --- a/src/UI/Calendar/CalendarView.js +++ b/src/UI/Calendar/CalendarView.js @@ -165,6 +165,10 @@ define( statusLevel = 'danger'; } + else if (element.get('episodeNumber') === 1) { + statusLevel = 'pink'; + } + if (end.isBefore(currentTime.startOf('day'))) { statusLevel += ' past'; } diff --git a/src/UI/Calendar/calendar.less b/src/UI/Calendar/calendar.less index a383a6126..389248a3c 100644 --- a/src/UI/Calendar/calendar.less +++ b/src/UI/Calendar/calendar.less @@ -111,6 +111,10 @@ border-color : @nzbdronePurple; } + .pink { + border-color : @nzbdronePink; + } + .episode-title { .btn-link; .text-overflow; @@ -167,6 +171,11 @@ background-color : @nzbdronePurple; } + .pink { + border-color : @nzbdronePink; + background-color : @nzbdronePink; + } + .chart { margin-top : 2px; margin-right: 2px; diff --git a/src/UI/Content/variables.less b/src/UI/Content/variables.less index 24b2846d3..f320e3498 100644 --- a/src/UI/Content/variables.less +++ b/src/UI/Content/variables.less @@ -1,7 +1,8 @@ -@nzbdroneRed: #c4273c; -@purple: #7a43b6; -@nzbdronePurple: #7932ea; -@droneTeal: #35c5f4; +@nzbdroneRed : #c4273c; +@purple : #7a43b6; +@nzbdronePurple : #7932ea; +@nzbdronePink : #F43565; +@droneTeal : #35c5f4; @screen-tn-max: @screen-xs-min - 1; @tn: ~'(max-width: @{screen-tn-max})'; diff --git a/src/UI/Handlebars/Helpers/Episode.js b/src/UI/Handlebars/Helpers/Episode.js index 0ee706fb4..97c67f9bc 100644 --- a/src/UI/Handlebars/Helpers/Episode.js +++ b/src/UI/Handlebars/Helpers/Episode.js @@ -37,6 +37,10 @@ define( return 'purple'; } + if (this.episodeNumber === 1) { + return 'pink'; + } + if (currentTime.isAfter(start) && currentTime.isBefore(end)) { return 'warning'; }