From f0654de84b6f51a9f712181b31a5c48835063fb2 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 14 Aug 2020 15:05:51 +0200 Subject: Add two new node states: 'preparing' and 'ready'. --- src/ws/node.js | 8 ++++++++ src/ws/view.js | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'src') diff --git a/src/ws/node.js b/src/ws/node.js index fd4a9d7..2f93dac 100644 --- a/src/ws/node.js +++ b/src/ws/node.js @@ -389,6 +389,14 @@ Node.prototype.setAttribute = function(name, value) { this.state_element.style.backgroundColor = "#da4343"; } + else if(value == "preparing") + { + this.state_element.style.backgroundColor = "#f1e0b4"; + } + else if(value == "ready") + { + this.state_element.style.backgroundColor = "#bad0aa"; + } else { this.state_element.style.backgroundColor = "#ebedf0"; diff --git a/src/ws/view.js b/src/ws/view.js index 5b69a24..70d938a 100644 --- a/src/ws/view.js +++ b/src/ws/view.js @@ -424,6 +424,12 @@ function changeState(e) break; default: case "todo": + update(id, "state", "preparing"); + break; + case "preparing": + update(id, "state", "ready"); + break; + case "ready": update(id, "state", "in-progress"); break; } -- cgit v1.2.3