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

Add onDesktopDisconnect hook, refactor plugin hooks on front end to be variable

This commit is contained in:
Ryan Blenis 2019-11-13 16:31:29 -05:00
parent 942eafb70d
commit 786934b72c
2 changed files with 8 additions and 5 deletions

View file

@ -66,13 +66,15 @@ module.exports.pluginHandler = function (parent) {
}
}
str += `obj.onDeviceRefeshEnd = function(nodeid, panel, refresh, event) {
for (const p of Object.keys(obj)) {
if (typeof obj[p].onDeviceRefreshEnd == 'function') {
obj[p].onDeviceRefreshEnd(nodeid, panel, refresh, event);
str += `
obj.callHook = function(hookName, ...args) {
for (const p of Object.keys(obj)) {
if (typeof obj[p][hookName] == 'function') {
obj[p][hookName](args);
}
}
};
obj.registerPluginTab = function(pluginRegInfo) {
var d = pluginRegInfo();
if (!Q(d.tabId)) {