mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-07-26 09:18:39 +00:00
Merge pull request #276 from tm1000/bugfix/delete-devices
Delete devices by null coalesce if never connected
This commit is contained in:
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Electron: Main",
|
||||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
|
||||
"runtimeArgs": ["--remote-debugging-port=9223", "."],
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Electron: Renderer",
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
"port": 9223,
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"timeout": 30000
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Electron: All",
|
||||
"configurations": ["Electron: Main", "Electron: Renderer"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"eslint.validate": ["javascript"],
|
||||
"html.validate.styles": false // accept templates inside HTML style attributes
|
||||
|
||||
+4
-4
@@ -257,13 +257,13 @@ module.exports.deleteActive = function deleteActive() {
|
||||
|
||||
if (choice) {
|
||||
if (device.plugin.config.connectionType === 'TCPsocket') {
|
||||
device.connection.destroy();
|
||||
device.connection?.destroy();
|
||||
} else if (device.plugin.config.connectionType === 'UDPsocket') {
|
||||
device.connection.close();
|
||||
device.connection?.close();
|
||||
} else if (device.plugin.config.connectionType === 'multicast') {
|
||||
device.connection.close();
|
||||
device.connection?.close();
|
||||
} else if (device.plugin.config.connectionType.startsWith('osc')) {
|
||||
device.connection.close();
|
||||
device.connection?.close();
|
||||
}
|
||||
VIEW.removeDeviceFromList(device);
|
||||
delete devices[device.id];
|
||||
|
||||
Reference in New Issue
Block a user