Remove automatic transfer reporting

This commit is contained in:
Matt 2016-06-29 12:01:17 -04:00
parent 474af9c568
commit 76cd62449e
3 changed files with 29 additions and 9 deletions

View File

@ -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
capture.store.events = [];
capture.store.start = +new Date();
if (capture.active) {
capture.store.events = [];
capture.store.start = +new Date();
}
};
capture.end = function () {
'use strict';
return capture.save();
if (capture.active) {
return capture.save();
} else {
return '';
}
};
capture.proj_start = function () {
'use strict';

View File

@ -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');

View File

@ -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();