1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added support for custom ui buttons and dialogs.

This commit is contained in:
Ylian Saint-Hilaire 2020-06-01 17:26:27 -07:00
parent 04188019a0
commit 8c0ae5bb52
10 changed files with 100 additions and 15 deletions

View file

@ -4323,6 +4323,15 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
}
break;
}
case 'uicustomevent': {
// Event the change
var message = { etype: 'user', userid: user._id, username: user.name, action: 'uicustomevent', domain: domain.id, nolog: 1, uisection: command.section, element: command.element };
if (command.selectedDevices != null) { message.selectedDevices = command.selectedDevices; }
if (command.src != null) { message.src = command.src; }
if (command.values != null) { message.values = command.values; }
parent.parent.DispatchEvent(['*', user._id], obj, message);
break;
}
default: {
// Unknown user action
console.log('Unknown action from user ' + user.name + ': ' + command.action + '.');