Browse Source

move indicator message setTimeout into StatusBar module

experimental
Paweł Jedwabny 4 years ago
parent
commit
8e7296e69f
2 changed files with 7 additions and 11 deletions
  1. +6
    -11
      src/epesi.js
  2. +1
    -0
      src/statusBar.js

+ 6
- 11
src/epesi.js View File

@@ -50,17 +50,12 @@ class Epesi {
};

updateIndicator = () => {
if(this.procOn){
this.statusBar.fadeIn();
}else{
if(this.message) {
this.statusBar.showMessage(this.message);
this.message = null;
setTimeout(this.statusBar.fadeOut,5000);
}else{
this.statusBar.fadeOut()
};
};
if(this.procOn) this.statusBar.fadeIn();
else if(this.message) {
this.statusBar.showMessage(this.message);
this.message = null;
}
else this.statusBar.fadeOut()
};

updateIndicatorText = text => this.statusBar.setIndicatorText(text);


+ 1
- 0
src/statusBar.js View File

@@ -20,6 +20,7 @@ class StatusBar {
showMessage = (message) => {
document.getElementById('dismiss').style.display = '';
this.setIndicatorText(message);
setTimeout(this.fadeOut, 5000);
};

setIndicatorText = text => document.getElementById(this.indicator_text).innerHTML = text;


Loading…
Cancel
Save