From 6e9bad57723919dc3fd63a5748902e9049320603 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Tue, 22 Jan 2019 23:35:12 +0100 Subject: IFTTT: card colors: add an actual white entry To unset the color through the IFTTT, we need a white entry. However, we do not want to show the white enry in the hamburger `Set Color` entry. We can also give the `white` capability to the API, it won't hurt and be more straightforward. --- client/components/cards/cardDetails.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client/components/cards/cardDetails.js') diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index cc04b830..04620084 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -601,6 +601,9 @@ BlazeComponent.extendComponent({ }, isSelected(color) { + if (this.currentColor.get() === null) { + return color === 'white'; + } return this.currentColor.get() === color; }, -- cgit v1.2.3-1-g7c22 From 5fa0821e078ff03647d23909517ddf6984f8baf5 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Thu, 24 Jan 2019 16:41:23 +0100 Subject: card colors: remove unused variables --- client/components/cards/cardDetails.js | 1 - 1 file changed, 1 deletion(-) (limited to 'client/components/cards/cardDetails.js') diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 04620084..79a686a7 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -27,7 +27,6 @@ BlazeComponent.extendComponent({ onCreated() { this.currentBoard = Boards.findOne(Session.get('currentBoard')); this.isLoaded = new ReactiveVar(false); - this.currentColor = new ReactiveVar(this.data().color); const boardBody = this.parentComponent().parentComponent(); //in Miniview parent is Board, not BoardBody. if (boardBody !== null) { -- cgit v1.2.3-1-g7c22