diff options
Diffstat (limited to 'client/components/cards')
-rw-r--r-- | client/components/cards/cardDate.js | 9 | ||||
-rw-r--r-- | client/components/cards/labels.styl | 12 | ||||
-rw-r--r-- | client/components/cards/minicard.jade | 12 |
3 files changed, 28 insertions, 5 deletions
diff --git a/client/components/cards/cardDate.js b/client/components/cards/cardDate.js index 52a48f47..e95c3a23 100644 --- a/client/components/cards/cardDate.js +++ b/client/components/cards/cardDate.js @@ -279,11 +279,14 @@ class CardDueDate extends CardDate { classes() { let classes = 'due-date' + ' '; - if (this.now.get().diff(this.date.get(), 'days') >= 2) + if ((this.now.get().diff(this.date.get(), 'days') >= 2) && + (this.date.get().isBefore(this.data().endAt))) classes += 'long-overdue'; - else if (this.now.get().diff(this.date.get(), 'minute') >= 0) + else if ((this.now.get().diff(this.date.get(), 'minute') >= 0) && + (this.date.get().isBefore(this.data().endAt))) classes += 'due'; - else if (this.now.get().diff(this.date.get(), 'days') >= -1) + else if ((this.now.get().diff(this.date.get(), 'days') >= -1) && + (this.date.get().isBefore(this.data().endAt))) classes += 'almost-due'; return classes; } diff --git a/client/components/cards/labels.styl b/client/components/cards/labels.styl index 084af64c..3b481d93 100644 --- a/client/components/cards/labels.styl +++ b/client/components/cards/labels.styl @@ -3,7 +3,7 @@ // XXX Use .board-widget-labels as a flexbox container .card-label border-radius: 4px - color: white + color: white //Default white text, in select cases, changed to black to improve contrast between label colour and text display: inline-block font-weight: 700 font-size: 13px @@ -48,9 +48,11 @@ .card-label-yellow background-color: #fad900 + color: #000000 //Black text for better visibility .card-label-orange background-color: #ff9f19 + color: #000000 //Black text for better visibility .card-label-red background-color: #eb4646 @@ -63,6 +65,7 @@ .card-label-pink background-color: #ff78cb + color: #000000 //Black text for better visibility .card-label-sky background-color: #00c2e0 @@ -72,18 +75,22 @@ .card-label-lime background-color: #51e898 + color: #000000 //Black text for better visibility .card-label-silver background-color: #c0c0c0 + color: #000000 //Black text for better visibility .card-label-peachpuff background-color: #ffdab9 + color: #000000 //Black text for better visibility .card-label-crimson background-color: #dc143c .card-label-plum background-color: #dda0dd + color: #000000 //Black text for better visibility .card-label-darkgreen background-color: #006400 @@ -96,6 +103,7 @@ .card-label-gold background-color: #ffd700 + color: #000000 //Black text for better visibility .card-label-navy background-color: #000080 @@ -108,9 +116,11 @@ .card-label-paleturquoise background-color: #afeeee + color: #000000 //Black text for better visibility .card-label-mistyrose background-color: #ffe4e1 + color: #000000 //Black text for better visibility .card-label-indigo background-color: #4b0082 diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index aa0708dd..b44021a6 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -10,12 +10,22 @@ template(name="minicard") +viewer = title .dates + if receivedAt + unless startAt + unless dueAt + unless endAt + .date + +miniCardReceivedDate if startAt .date +minicardStartDate if dueAt + unless endAt + .date + +minicardDueDate + if endAt .date - +minicardDueDate + +minicardEndDate if spentTime .date +cardSpentTime |