From 3e8bff224861fefb7e5d4bfbca6a046bc11a5e7e Mon Sep 17 00:00:00 2001 From: Ryan Blenis Date: Mon, 2 Dec 2019 18:13:19 -0500 Subject: [PATCH] Show/Hide Plugins tab in device view only if plugins exists that use that functionality --- pluginHandler.js | 1 + views/default.handlebars | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pluginHandler.js b/pluginHandler.js index 47f561b6..e324cb21 100644 --- a/pluginHandler.js +++ b/pluginHandler.js @@ -100,6 +100,7 @@ module.exports.pluginHandler = function (parent) { QA('p19headers', ''+d.tabTitle+''); QA('p19pages', '
'); } + QV('MainDevPlugins', true); }; obj.callPluginPage = function(id, el) { var pages = Q('p19pages').querySelectorAll("#p19pages>div"); diff --git a/views/default.handlebars b/views/default.handlebars index bc35201c..654343f7 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -4528,7 +4528,7 @@ QV('MainDevFiles', ((mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 4) != 0))) && (meshrights & 8) && fileAccess); QV('MainDevAmt', (node.intelamt != null) && ((node.intelamt.state == 2) || (node.conn & 2)) && (meshrights & 8) && amtAccess); QV('MainDevConsole', (consoleRights && (mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 8) != 0))) && (meshrights & 8)); - QV('MainDevPlugins', pluginHandler != null); + QV('MainDevPlugins', false); QV('p15uploadCore', (node.agent != null) && (node.agent.caps != null) && ((node.agent.caps & 16) != 0)); QH('p15coreName', ((node.agent != null) && (node.agent.core != null))?node.agent.core:'');