2016-06-19 00:15:41 +00:00
|
|
|
var devices = {};
|
|
|
|
|
|
|
|
devices.init = function () {
|
|
|
|
'use strict';
|
|
|
|
devices.listen();
|
|
|
|
gui.overlay(true);
|
|
|
|
gui.spinner(true);
|
|
|
|
};
|
|
|
|
devices.listen = function () {
|
|
|
|
'use strict';
|
2018-01-09 18:01:19 +00:00
|
|
|
|
|
|
|
ipcRenderer.on('ready', devices.ready);
|
2016-06-19 00:15:41 +00:00
|
|
|
};
|
2018-01-09 18:01:19 +00:00
|
|
|
devices.ready = function (event, arg) {
|
2016-06-19 00:15:41 +00:00
|
|
|
'use strict';
|
2018-01-09 18:01:19 +00:00
|
|
|
let opt;
|
2016-06-19 00:15:41 +00:00
|
|
|
gui.spinner(false);
|
|
|
|
gui.overlay(false);
|
2018-01-09 18:01:19 +00:00
|
|
|
for (let i in arg) {
|
|
|
|
opt = $('<option>');
|
|
|
|
opt.val(arg[i]);
|
|
|
|
opt.text(arg[i]);
|
|
|
|
$(`#${i}_device`).empty();
|
|
|
|
$(`#${i}_device`).append(opt);
|
|
|
|
}
|
|
|
|
return event.returnValue = true;
|
2016-06-19 00:15:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = devices;
|