Remove automatic transfer reporting
This commit is contained in:
parent
474af9c568
commit
76cd62449e
|
@ -3,7 +3,7 @@ var capture = {},
|
|||
fs = require('fs'),
|
||||
exec = require('child_process').exec;
|
||||
|
||||
capture.active = true;
|
||||
capture.active = false;
|
||||
capture.store = {
|
||||
events : [],
|
||||
start : 0
|
||||
|
@ -12,12 +12,18 @@ capture.store = {
|
|||
capture.start = function (first) {
|
||||
'use strict';
|
||||
//reset storage
|
||||
if (capture.active) {
|
||||
capture.store.events = [];
|
||||
capture.store.start = +new Date();
|
||||
}
|
||||
};
|
||||
capture.end = function () {
|
||||
'use strict';
|
||||
if (capture.active) {
|
||||
return capture.save();
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
capture.proj_start = function () {
|
||||
'use strict';
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
var seq = {};
|
||||
var seq = {},
|
||||
capture = {};
|
||||
|
||||
/******
|
||||
Sequence Object
|
||||
*******/
|
||||
seq.i = 0;
|
||||
mcopy.loop = 1;
|
||||
mcopy.loopCount = 0;
|
||||
seq.time = 0;
|
||||
seq.stopState = false;
|
||||
|
||||
mcopy.loop = 1;
|
||||
mcopy.loopCount = 0;
|
||||
capture.active = false;
|
||||
capture.report = '';
|
||||
|
||||
seq.run = function () {
|
||||
'use strict';
|
||||
var c = mcopy.state.sequence.arr[seq.i],
|
||||
|
@ -65,7 +70,10 @@ seq.run = function () {
|
|||
log.info('Sequence completed in ' + humanizeDuration(timeEnd), 'SEQUENCE', true);
|
||||
}
|
||||
|
||||
alert(ipcRenderer.sendSync('transfer', { action: 'end'}));
|
||||
capture.report = ipcRenderer.sendSync('transfer', { action: 'end'});
|
||||
if (capture.active) {
|
||||
alert(capture.report);
|
||||
}
|
||||
gui.notify('Sequence done!', (mcopy.state.sequence.arr.length * mcopy.loop) + ' actions completed in ' + humanizeDuration(timeEnd));
|
||||
//clear gui
|
||||
$('.row input').removeClass('h');
|
||||
|
|
|
@ -467,7 +467,13 @@ transfer.listen = function () {
|
|||
ipcMain.on('transfer', function (event, arg) {
|
||||
var res = '';
|
||||
//also turn on and off
|
||||
if (arg.action === 'start') {
|
||||
if (arg.action === 'enable') {
|
||||
capture.active = true;
|
||||
res = capture.active;
|
||||
} else if (arg.action === 'disable') {
|
||||
capture.active = false;
|
||||
res = capture.active;
|
||||
} else if (arg.action === 'start') {
|
||||
capture.start();
|
||||
} else if (arg.action === 'end') {
|
||||
res = capture.end();
|
||||
|
|
Loading…
Reference in New Issue