mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
minor fixes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4f08c68179
commit
8efdcbd3eb
@ -941,7 +941,11 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
.then(function(){
|
||||
that.data.clear(res)
|
||||
return res })
|
||||
: res }) }],
|
||||
: res })
|
||||
// clear out progress...
|
||||
.then(function(res){
|
||||
logger && rem_logger.emit('done')
|
||||
return res }) }],
|
||||
|
||||
|
||||
// XXX EXPERIMENTAL...
|
||||
|
||||
@ -193,18 +193,23 @@ var ProgressActions = actions.Actions({
|
||||
'removed',
|
||||
]
|
||||
|
||||
// close...
|
||||
// XXX is the right keyword...
|
||||
if(status == 'done' && rest.length == 0){
|
||||
this.showProgress(path, 'close')
|
||||
|
||||
// report progress...
|
||||
// XXX HACK -- need meaningful status...
|
||||
if(add.includes(status)){
|
||||
this.showProgress(msg, '+0', '+'+l)
|
||||
} else if(add.includes(status)){
|
||||
this.showProgress(path, '+0', '+'+l)
|
||||
|
||||
} else if(done.includes(status)){
|
||||
this.showProgress(msg, '+'+l)
|
||||
this.showProgress(path, '+'+l)
|
||||
|
||||
} else if(skipped.includes(status)){
|
||||
// XXX if everything is skipped the indicator does not
|
||||
// get hidden...
|
||||
this.showProgress(msg, '+'+l)
|
||||
this.showProgress(path, '+'+l)
|
||||
|
||||
// XXX STUB...
|
||||
} else if(status == 'error' ){
|
||||
|
||||
@ -367,29 +367,23 @@ function(path, index_dir, logger){
|
||||
getIndexes(path, index_dir, logger)
|
||||
.catch(function(err){
|
||||
logger && logger.emit('error', err)
|
||||
console.error(err)
|
||||
})
|
||||
console.error(err) })
|
||||
.then(function(paths){
|
||||
// start loading...
|
||||
return Promise.all(paths.map(function(p){
|
||||
p = util.normalizePath(p)
|
||||
//var path = pathlib.normalize(p +'/'+ index_dir)
|
||||
var path = util.normalizePath(p +'/'+ index_dir)
|
||||
return loadSaveHistoryList(path, index_dir)
|
||||
.then(function(obj){
|
||||
// NOTE: considering that all the paths within
|
||||
// the index are relative to the preview
|
||||
// dir (the parent dir to the index root)
|
||||
// we do not need to include the index
|
||||
// itself in the base path...
|
||||
res[p] = obj
|
||||
})
|
||||
}))
|
||||
})
|
||||
.then(function(){ resolve(res) })
|
||||
}
|
||||
})
|
||||
}
|
||||
return Promise
|
||||
.all(paths.map(function(p){
|
||||
p = util.normalizePath(p)
|
||||
//var path = pathlib.normalize(p +'/'+ index_dir)
|
||||
var path = util.normalizePath(p +'/'+ index_dir)
|
||||
return loadSaveHistoryList(path, index_dir)
|
||||
.then(function(obj){
|
||||
// NOTE: considering that all the paths within
|
||||
// the index are relative to the preview
|
||||
// dir (the parent dir to the index root)
|
||||
// we do not need to include the index
|
||||
// itself in the base path...
|
||||
res[p] = obj }) })) })
|
||||
.then(function(){ resolve(res) }) } }) }
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user