mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-05 22:03:41 +00:00
eslint fix spaced-comment errors
This commit is contained in:
@@ -22,11 +22,11 @@ const createWindow = () => {
|
||||
transparent: true,
|
||||
frame: false,
|
||||
show: false,
|
||||
//backgroundColor: "#333333",
|
||||
// backgroundColor: "#333333",
|
||||
vibrancy: 'window',
|
||||
visualEffectState: 'followWindow',
|
||||
webPreferences: {
|
||||
//enableRemoteModule: true,
|
||||
// enableRemoteModule: true,
|
||||
contextIsolation: false,
|
||||
nodeIntegration: true,
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
|
||||
+6
-6
@@ -13,7 +13,7 @@ exports.searchOptions = {
|
||||
};
|
||||
exports.defaultPort = 3032;
|
||||
|
||||
//"\xc0/eos/ping\x00\x00\x2c\x00\x00\x00\xc0"
|
||||
// "\xc0/eos/ping\x00\x00\x2c\x00\x00\x00\xc0"
|
||||
|
||||
exports.ready = function (device) {
|
||||
device.send('/eos/get/cuelist/count');
|
||||
@@ -90,10 +90,10 @@ exports.data = function (device, osc) {
|
||||
),
|
||||
};
|
||||
|
||||
//console.log(p[4]+" "+p[5]+" "+p[6]+" updated")
|
||||
// console.log(p[4]+" "+p[5]+" "+p[6]+" updated")
|
||||
device.draw();
|
||||
} else if (p[1] == 'out' && p[2] == 'get' && p[3] == 'cue' && p.length == 6) {
|
||||
//console.log("cue "+p[4]+" "+p[5]+" deleted")
|
||||
// console.log("cue "+p[4]+" "+p[5]+" deleted")
|
||||
|
||||
// There's no OSC notification of the deletion of a part. It just tells you to update the parent cue and remaining children.
|
||||
// So: we should fetch all the parts of a cue somehow every time there's an update to a cue.
|
||||
@@ -125,7 +125,7 @@ exports.data = function (device, osc) {
|
||||
var cueNumber = osc.args[1];
|
||||
|
||||
device.send(`/eos/get/cue/${cueList}/${cueNumber}`);
|
||||
//console.log("SENT /eos/get/cue/"+cueList+"/"+cueNumber);
|
||||
// console.log("SENT /eos/get/cue/"+cueList+"/"+cueNumber);
|
||||
} else if (
|
||||
p[2] == 'cmd' ||
|
||||
p[2] == 'ping' ||
|
||||
@@ -135,9 +135,9 @@ exports.data = function (device, osc) {
|
||||
} else if (p[3] == 'version') {
|
||||
device.data.version = osc.args[0];
|
||||
} else {
|
||||
//console.log(osc);
|
||||
// console.log(osc);
|
||||
}
|
||||
//console.log(p)
|
||||
// console.log(p)
|
||||
};
|
||||
exports.heartbeat = function (device) {
|
||||
device.send('/eos/ping');
|
||||
|
||||
@@ -13,8 +13,8 @@ exports.searchOptions = {
|
||||
exports.defaultPort = 4352;
|
||||
|
||||
exports.ready = function (device) {
|
||||
//Power status query
|
||||
//device.send("%1POWR ?\r");
|
||||
// Power status query
|
||||
// device.send("%1POWR ?\r");
|
||||
};
|
||||
var password = false;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ exports.data = function (device, osc) {
|
||||
var p = osc.address.split('/');
|
||||
p.shift();
|
||||
|
||||
//console.log(address)
|
||||
// console.log(address)
|
||||
|
||||
if (osc.address == '/reply/workspaces') {
|
||||
const d = JSON.parse(osc.args[0]).data;
|
||||
@@ -53,7 +53,7 @@ exports.data = function (device, osc) {
|
||||
|
||||
for (var cueIndex in group.cues) {
|
||||
var cue = group.cues[cueIndex];
|
||||
//console.log(cue)
|
||||
// console.log(cue)
|
||||
|
||||
device.data.lastCueInGroup[group.uniqueID] = cue;
|
||||
|
||||
@@ -81,7 +81,7 @@ exports.data = function (device, osc) {
|
||||
}
|
||||
}
|
||||
|
||||
//console.log(device.data.lastCueInGroup)
|
||||
// console.log(device.data.lastCueInGroup)
|
||||
|
||||
device.draw();
|
||||
} else if (p[0] == 'update' && p[1] == 'workspace' && p[3] == 'cue_id') {
|
||||
|
||||
@@ -50,7 +50,7 @@ exports.data = function (device, message) {
|
||||
// if(msg.substring(0, 5)=="Error"){
|
||||
// device.data.error = msg.substring(6, 7);
|
||||
// }
|
||||
//console.log(msg)
|
||||
// console.log(msg)
|
||||
};
|
||||
|
||||
exports.heartbeat = function (device) {
|
||||
|
||||
+6
-6
@@ -25,10 +25,10 @@ exports.ready = function (device) {
|
||||
|
||||
device.send(Buffer.from('/xinfo'));
|
||||
|
||||
//device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
|
||||
//device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
|
||||
// device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
|
||||
// device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
|
||||
|
||||
//device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001"));
|
||||
// device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001"));
|
||||
};
|
||||
|
||||
exports.data = function (device, buf) {
|
||||
@@ -56,7 +56,7 @@ exports.data = function (device, buf) {
|
||||
}
|
||||
device.draw();
|
||||
} else if (msg[0] == '/meters/0') {
|
||||
//console.log(msg)
|
||||
// console.log(msg)
|
||||
} else if (msg[0].indexOf('/mix/fader') >= 0) {
|
||||
var addr = parseAddress(msg[0]);
|
||||
var channel = Number(addr[1]);
|
||||
@@ -102,9 +102,9 @@ exports.data = function (device, buf) {
|
||||
device.draw();
|
||||
device.send(Buffer.from(`/ch/${addr[1]}/mix/on\u0000\u0000\u0000\u0000`));
|
||||
} else {
|
||||
//console.log(msg)
|
||||
// console.log(msg)
|
||||
}
|
||||
//console.log(msg)
|
||||
// console.log(msg)
|
||||
};
|
||||
|
||||
exports.heartbeat = function (device) {
|
||||
|
||||
@@ -25,10 +25,10 @@ exports.ready = function (device) {
|
||||
|
||||
device.send(Buffer.from('/xinfo'));
|
||||
|
||||
//device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
|
||||
//device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
|
||||
// device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
|
||||
// device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
|
||||
|
||||
//device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001"));
|
||||
// device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001"));
|
||||
};
|
||||
|
||||
exports.data = function (device, buf) {
|
||||
@@ -61,7 +61,7 @@ exports.data = function (device, buf) {
|
||||
}
|
||||
device.draw();
|
||||
} else if (msg[0] == '/meters/0') {
|
||||
//console.log(msg)
|
||||
// console.log(msg)
|
||||
} else if (msg[0].indexOf('/mix/fader') >= 0) {
|
||||
var addr = parseAddress(msg[0]);
|
||||
var channel = Number(addr[1]);
|
||||
@@ -107,9 +107,9 @@ exports.data = function (device, buf) {
|
||||
device.draw();
|
||||
device.send(Buffer.from(`/ch/${addr[1]}/mix/on\u0000\u0000\u0000\u0000`));
|
||||
} else {
|
||||
//console.log(msg)
|
||||
// console.log(msg)
|
||||
}
|
||||
//console.log(msg)
|
||||
// console.log(msg)
|
||||
};
|
||||
|
||||
exports.heartbeat = function (device) {
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
const { remote } = require('electron');
|
||||
const { ipcRenderer } = require('electron');
|
||||
//let currWindow = remote.BrowserWindow.getFocusedWindow();
|
||||
// let currWindow = remote.BrowserWindow.getFocusedWindow();
|
||||
const { v4: uuid } = require('uuid');
|
||||
let ejs = require('ejs');
|
||||
|
||||
@@ -124,14 +124,14 @@ window.init = function () {
|
||||
.classList.remove('active-device');
|
||||
ipcRenderer.send('disableDeviceDropdown', '');
|
||||
} catch (err) {
|
||||
//console.log(err)
|
||||
// console.log(err)
|
||||
}
|
||||
try {
|
||||
document
|
||||
.getElementsByClassName('active-device-outline')[0]
|
||||
.classList.remove('active-device-outline');
|
||||
} catch (err) {
|
||||
//console.log(err)
|
||||
// console.log(err)
|
||||
}
|
||||
|
||||
VIEW.switchDevice();
|
||||
@@ -174,7 +174,7 @@ function switchClass(element, className) {
|
||||
try {
|
||||
document.getElementsByClassName(className)[0].classList.remove(className);
|
||||
} catch (err) {
|
||||
//console.log(err)
|
||||
// console.log(err)
|
||||
}
|
||||
element.classList.add(className);
|
||||
}
|
||||
|
||||
+10
-10
@@ -39,7 +39,7 @@ registerDevice = function (newDevice) {
|
||||
}
|
||||
}
|
||||
|
||||
//console.log("Registered new "+newDevice.type)
|
||||
// console.log("Registered new "+newDevice.type)
|
||||
|
||||
var id = newDevice.id || uuid();
|
||||
devices[id] = {
|
||||
@@ -92,7 +92,7 @@ initDeviceConnection = function (id) {
|
||||
});
|
||||
device.connection.open();
|
||||
device.connection.on('error', function (error) {
|
||||
//console.error(error)
|
||||
// console.error(error)
|
||||
device.connection.close();
|
||||
});
|
||||
device.connection.on('ready', function () {
|
||||
@@ -102,7 +102,7 @@ initDeviceConnection = function (id) {
|
||||
}
|
||||
});
|
||||
device.connection.on('message', function (message) {
|
||||
//log("OSC IN", message.address);
|
||||
// log("OSC IN", message.address);
|
||||
plugins[type].data(device, message);
|
||||
device.lastMessage = Date.now();
|
||||
});
|
||||
@@ -119,7 +119,7 @@ initDeviceConnection = function (id) {
|
||||
);
|
||||
|
||||
device.connection.on('error', function (error) {
|
||||
//console.error(error)
|
||||
// console.error(error)
|
||||
});
|
||||
device.connection.on('ready', function () {
|
||||
plugins[type].ready(device);
|
||||
@@ -128,13 +128,13 @@ initDeviceConnection = function (id) {
|
||||
}
|
||||
});
|
||||
device.connection.on('data', function (message) {
|
||||
//log("SOCK IN", message);
|
||||
// log("SOCK IN", message);
|
||||
plugins[type].data(device, message);
|
||||
device.lastMessage = Date.now();
|
||||
infoUpdate(device, 'status', 'ok');
|
||||
});
|
||||
device.send = function (data) {
|
||||
//log("SOCK OUT", data);
|
||||
// log("SOCK OUT", data);
|
||||
device.connection.write(data);
|
||||
};
|
||||
} else if (plugins[type].connectionType == 'UDPsocket') {
|
||||
@@ -155,7 +155,7 @@ initDeviceConnection = function (id) {
|
||||
device.port,
|
||||
device.addresses[0],
|
||||
function (err) {
|
||||
//console.log(err);
|
||||
// console.log(err);
|
||||
}
|
||||
);
|
||||
};
|
||||
@@ -186,7 +186,7 @@ module.exports.changeActiveType = function (newType) {
|
||||
|
||||
initDeviceConnection(device.id);
|
||||
VIEW.draw(device);
|
||||
//SAVESLOTS.saveAll();
|
||||
// SAVESLOTS.saveAll();
|
||||
};
|
||||
|
||||
module.exports.changeActiveIP = function (newIP) {
|
||||
@@ -221,7 +221,7 @@ module.exports.changeActivePinIndex = function (newPin) {
|
||||
};
|
||||
module.exports.changePinIndex = function (device, newPin) {
|
||||
device.pinIndex = newPin;
|
||||
//SAVESLOTS.saveAll();
|
||||
// SAVESLOTS.saveAll();
|
||||
};
|
||||
module.exports.refreshActive = function () {
|
||||
var device = VIEW.getActiveDevice();
|
||||
@@ -255,7 +255,7 @@ function heartbeat() {
|
||||
if (device.port != undefined && device.addresses.length > 0) {
|
||||
PLUGINS.all[device.type].heartbeat(device);
|
||||
} else {
|
||||
//console.error("Invalid IP/Port on device "+device.name)
|
||||
// console.error("Invalid IP/Port on device "+device.name)
|
||||
}
|
||||
}
|
||||
device.lastHeartbeat = Date.now();
|
||||
|
||||
+3
-3
@@ -8,10 +8,10 @@ document.getElementById('search-button').onclick = function (e) {
|
||||
window.searchAll();
|
||||
};
|
||||
document.getElementById('add-device-button').onclick = function (e) {
|
||||
//e.stopPropagation();
|
||||
//document.getElementById("add-device-popover").style.display = "block";
|
||||
// e.stopPropagation();
|
||||
// document.getElementById("add-device-popover").style.display = "block";
|
||||
};
|
||||
|
||||
window.closePopovers = function () {
|
||||
//document.getElementById("add-device-popover").style.display = "none";
|
||||
// document.getElementById("add-device-popover").style.display = "none";
|
||||
};
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ loadSlot = function (slotIndex) {
|
||||
var savedDevice = savedSlots[slotIndex][d];
|
||||
for (var d in DEVICE.all) {
|
||||
var device = DEVICE.all[d];
|
||||
//if(device.addresses[0] == savedDevice.addresses[0] && device.type == savedDevice.type){
|
||||
// if(device.addresses[0] == savedDevice.addresses[0] && device.type == savedDevice.type){
|
||||
if (device.id == savedDevice.id) {
|
||||
VIEW.pinDevice(device);
|
||||
VIEW.switchDevice(device.id);
|
||||
|
||||
+9
-9
@@ -20,7 +20,7 @@ searchAll = function () {
|
||||
searching = true;
|
||||
ipcRenderer.send('disableSearchAll', '');
|
||||
document.getElementById('search-button').style.opacity = 0.2;
|
||||
//console.clear();
|
||||
// console.clear();
|
||||
|
||||
for (var i in DEVICE.all) {
|
||||
DEVICE.infoUpdate(DEVICE.all[i], 'status', 'refresh');
|
||||
@@ -28,7 +28,7 @@ searchAll = function () {
|
||||
|
||||
console.log('Searching...');
|
||||
|
||||
//findOnlineDevices();
|
||||
// findOnlineDevices();
|
||||
allServers = getServers();
|
||||
var TCPFlag = true;
|
||||
if (allServers.length > 2046) {
|
||||
@@ -62,9 +62,9 @@ searchAll = function () {
|
||||
}
|
||||
}
|
||||
|
||||
//searchBonjour();
|
||||
//searchTCP();
|
||||
//searchUDP();
|
||||
// searchBonjour();
|
||||
// searchTCP();
|
||||
// searchUDP();
|
||||
|
||||
setTimeout(function () {
|
||||
searching = false;
|
||||
@@ -166,7 +166,7 @@ TCPtest = function (ip, pluginType, plugin) {
|
||||
client.end();
|
||||
});
|
||||
client.on('error', function (err) {
|
||||
//no device here
|
||||
// no device here
|
||||
});
|
||||
};
|
||||
|
||||
@@ -301,7 +301,7 @@ newSearchUDP = function (pluginType, plugin) {
|
||||
plugin.searchOptions.devicePort,
|
||||
'255.255.255.255',
|
||||
(err) => {
|
||||
//console.log(err)
|
||||
// console.log(err)
|
||||
}
|
||||
);
|
||||
setTimeout(function () {
|
||||
@@ -310,7 +310,7 @@ newSearchUDP = function (pluginType, plugin) {
|
||||
plugin.searchOptions.devicePort,
|
||||
'255.255.255.255',
|
||||
(err) => {
|
||||
//console.log(err)
|
||||
// console.log(err)
|
||||
}
|
||||
);
|
||||
}, 100);
|
||||
@@ -320,7 +320,7 @@ newSearchUDP = function (pluginType, plugin) {
|
||||
plugin.searchOptions.devicePort,
|
||||
'255.255.255.255',
|
||||
(err) => {
|
||||
//console.log(err)
|
||||
// console.log(err)
|
||||
}
|
||||
);
|
||||
}, 400);
|
||||
|
||||
+4
-4
@@ -33,7 +33,7 @@ drawDeviceInterface = function (id) {
|
||||
".css' rel='stylesheet' type='text/css'>";
|
||||
}
|
||||
|
||||
//scrollbar styles are inline to prevent the styles flickering in
|
||||
// scrollbar styles are inline to prevent the styles flickering in
|
||||
str += '<style>';
|
||||
str += '::-webkit-scrollbar {background-color: black;width: 12px;}';
|
||||
str += '::-webkit-scrollbar-track {background-color: #2b2b2b;}';
|
||||
@@ -142,13 +142,13 @@ switchDevice = function (id) {
|
||||
'repeat(' + cols + ', 1fr)';
|
||||
|
||||
if (id == undefined) {
|
||||
//document.getElementById('refresh-device-button').style.opacity = 0.2;
|
||||
// document.getElementById('refresh-device-button').style.opacity = 0.2;
|
||||
document.getElementById('refresh-device-button').disabled = true;
|
||||
document.getElementById('device-settings-table').style.display = 'none';
|
||||
return true;
|
||||
} else {
|
||||
document.getElementById('refresh-device-button').disabled = false;
|
||||
//document.getElementById('refresh-device-button').style.opacity = 1;
|
||||
// document.getElementById('refresh-device-button').style.opacity = 1;
|
||||
}
|
||||
|
||||
var i = DEVICE.all[id].id;
|
||||
@@ -218,7 +218,7 @@ module.exports.unpinDevice = function (device) {
|
||||
module.exports.resetPinned = function () {
|
||||
pinnedDevices.length = 0;
|
||||
activeDevice = false;
|
||||
//switchDevice();
|
||||
// switchDevice();
|
||||
try {
|
||||
document
|
||||
.querySelector('#device-list .active-device')
|
||||
|
||||
Reference in New Issue
Block a user