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