minor fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-01-30 04:10:25 +03:00
parent 53970b2d91
commit 8326efd989

View File

@ -105,9 +105,12 @@ var CLIActions = actions.Actions({
// actions... // actions...
if(value == 'reset'){ if(value == 'reset'){
// XXX this is not the same as ui-progress... // XXX this is not the same as ui-progress...
// ...here we first set timeout then and close,
// there we set to 0 and timeout and close...
state.timeout = setTimeout( state.timeout = setTimeout(
function(){ function(){
this.showProgress(text, 0, 0) }.bind(this), //this.showProgress(text, 0, 0) }.bind(this),
this.showProgress(text, 'close') }.bind(this),
this.config['progress-done-delay'] || 1000) this.config['progress-done-delay'] || 1000)
return } return }
if(value == 'close'){ if(value == 'close'){
@ -170,8 +173,7 @@ var CLIActions = actions.Actions({
if(value >= max){ if(value >= max){
state.timeout = setTimeout( state.timeout = setTimeout(
function(){ function(){
delete state.timeout this.showProgress(text, 'close') }.bind(this),
this.showProgress(text, 'clear') }.bind(this),
this.config['progress-done-delay'] || 1000) } }], this.config['progress-done-delay'] || 1000) } }],
// handle logger progress... // handle logger progress...