mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-12 14:51:31 -05:00
Add onDesktopDisconnect hook, refactor plugin hooks on front end to be variable
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user