Merge pull request #700 from ryanblenis/plugin-admin

Show/Hide Plugins tab in device view
This commit is contained in:
Ylian Saint-Hilaire 2019-12-03 16:54:41 -08:00 committed by GitHub
commit 0d662950a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -100,6 +100,7 @@ module.exports.pluginHandler = function (parent) {
QA('p19headers', '<span ' + defaultOn + ' onclick="return pluginHandler.callPluginPage(\\''+d.tabId+'\\', this);">'+d.tabTitle+'</span>'); QA('p19headers', '<span ' + defaultOn + ' onclick="return pluginHandler.callPluginPage(\\''+d.tabId+'\\', this);">'+d.tabTitle+'</span>');
QA('p19pages', '<div id="' + d.tabId + '"></div>'); QA('p19pages', '<div id="' + d.tabId + '"></div>');
} }
QV('MainDevPlugins', true);
}; };
obj.callPluginPage = function(id, el) { obj.callPluginPage = function(id, el) {
var pages = Q('p19pages').querySelectorAll("#p19pages>div"); var pages = Q('p19pages').querySelectorAll("#p19pages>div");

View File

@ -4530,7 +4530,7 @@
QV('MainDevFiles', ((mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 4) != 0))) && (meshrights & 8) && fileAccess); 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('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('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)); 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:''); QH('p15coreName', ((node.agent != null) && (node.agent.core != null))?node.agent.core:'');