mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
.makePreview(..) reporting modes done +minor bugfixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0e026c2f86
commit
8f7c14dd92
@ -479,7 +479,7 @@ electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH)/
|
|||||||
.PHONY: electron-run
|
.PHONY: electron-run
|
||||||
electron-run: ## Run app in electron
|
electron-run: ## Run app in electron
|
||||||
electron-run: dev
|
electron-run: dev
|
||||||
electron .
|
electron e.js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -72,6 +72,11 @@ var SharpActions = actions.Actions({
|
|||||||
config: {
|
config: {
|
||||||
'preview-normalized': true,
|
'preview-normalized': true,
|
||||||
|
|
||||||
|
// can be:
|
||||||
|
// 'gids'
|
||||||
|
// 'files'
|
||||||
|
'preview-progress-mode': 'gids',
|
||||||
|
|
||||||
// NOTE: this uses 'preview-sizes' and 'preview-path-template'
|
// NOTE: this uses 'preview-sizes' and 'preview-path-template'
|
||||||
// from filesystem.IndexFormat...
|
// from filesystem.IndexFormat...
|
||||||
},
|
},
|
||||||
@ -139,14 +144,10 @@ var SharpActions = actions.Actions({
|
|||||||
`,
|
`,
|
||||||
function(images, sizes, base_path, logger){
|
function(images, sizes, base_path, logger){
|
||||||
var that = this
|
var that = this
|
||||||
|
var logger_mode = this.config['preview-progress-mode'] || 'gids'
|
||||||
logger = logger || this.logger
|
logger = logger || this.logger
|
||||||
logger = logger && logger.push('Previews')
|
logger = logger && logger.push('Previews')
|
||||||
|
|
||||||
// XXX
|
|
||||||
var logger_mode = 'report-gids'
|
|
||||||
//var logger_mode = 'report-previews'
|
|
||||||
|
|
||||||
|
|
||||||
// get/normalize images...
|
// get/normalize images...
|
||||||
//images = images || this.current
|
//images = images || this.current
|
||||||
images = images || 'all'
|
images = images || 'all'
|
||||||
@ -232,10 +233,10 @@ var SharpActions = actions.Actions({
|
|||||||
|
|
||||||
// NOTE: this will handle both 'queue' and 'resolved' statuses...
|
// NOTE: this will handle both 'queue' and 'resolved' statuses...
|
||||||
logger &&
|
logger &&
|
||||||
( logger_mode == 'report-gids' ?
|
( logger_mode == 'gids' ?
|
||||||
// report gid-level progress...
|
// report gid-level progress...
|
||||||
(data.res == 'all'
|
(data.res == 'all'
|
||||||
&& logger.emit(data.status, data.path))
|
&& logger.emit(data.status, data.gid))
|
||||||
// report preview-level progress...
|
// report preview-level progress...
|
||||||
: (data.res != 'all'
|
: (data.res != 'all'
|
||||||
&& logger.emit(data.status, data.path)) ) }
|
&& logger.emit(data.status, data.path)) ) }
|
||||||
|
|||||||
@ -42,6 +42,7 @@ var ProgressActions = actions.Actions({
|
|||||||
// .showProgress('text', '+0', '+1')
|
// .showProgress('text', '+0', '+1')
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
// XXX add message to be shown...
|
||||||
// XXX should we report errors and stoppages??? (error state??)
|
// XXX should we report errors and stoppages??? (error state??)
|
||||||
// XXX multiple containers...
|
// XXX multiple containers...
|
||||||
// XXX shorten the nested css class names...
|
// XXX shorten the nested css class names...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user