Added staleness indicator to the output

This commit is contained in:
n1474335 2017-07-28 15:43:23 +01:00
parent 78d0369e71
commit 98884d851a
4 changed files with 38 additions and 2 deletions

View file

@ -362,4 +362,28 @@ ControlsWaiter.prototype.supportButtonClick = function(e) {
}
};
/**
* Shows the stale indicator to show that the input or recipe has changed
* since the last bake.
*/
ControlsWaiter.prototype.showStaleIndicator = function() {
const staleIndicator = document.getElementById("stale-indicator");
staleIndicator.style.visibility = "visible";
staleIndicator.style.opacity = 1;
};
/**
* Hides the stale indicator to show that the input or recipe has not changed
* since the last bake.
*/
ControlsWaiter.prototype.hideStaleIndicator = function() {
const staleIndicator = document.getElementById("stale-indicator");
staleIndicator.style.opacity = 0;
staleIndicator.style.visibility = "hidden";
};
export default ControlsWaiter;