mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-07-26 09:18:39 +00:00
make a newly manually added device the active device
This commit is contained in:
+2
-1
@@ -95,7 +95,7 @@ window.init = function init() {
|
||||
};
|
||||
|
||||
document.getElementById('add-device-button').onchange = function addDeviceClick(e) {
|
||||
DEVICE.registerDevice(
|
||||
const newDevice = DEVICE.registerDevice(
|
||||
{
|
||||
type: e.target.value,
|
||||
defaultName: 'New Device',
|
||||
@@ -106,6 +106,7 @@ window.init = function init() {
|
||||
);
|
||||
e.target.selectedIndex = 0;
|
||||
|
||||
VIEW.switchDevice(newDevice.id);
|
||||
SAVESLOTS.saveAll();
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ function registerDevice(newDevice, discoveryMethod) {
|
||||
|
||||
VIEW.addDeviceToList(devices[id]);
|
||||
initDeviceConnection(id);
|
||||
return true;
|
||||
return devices[id];
|
||||
}
|
||||
module.exports.registerDevice = registerDevice;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user