mirror of https://github.com/node-red/node-red.git
parent
2aa1887af6
commit
4cc390ea36
|
|
@ -192,6 +192,10 @@ async function loadThemePlugin () {
|
|||
themeSettings.menu = Object.assign({}, themeSettings.menu, themePlugin.menu);
|
||||
}
|
||||
|
||||
if (themePlugin.help) {
|
||||
themeSettings.help = themePlugin.help;
|
||||
}
|
||||
|
||||
if (Array.isArray(themePlugin.palette?.theme)) {
|
||||
themeSettings.palette = themeSettings.palette || {};
|
||||
themeSettings.palette.theme = themePlugin.palette.theme;
|
||||
|
|
@ -389,6 +393,10 @@ module.exports = {
|
|||
themeSettings.tours = theme.tours;
|
||||
}
|
||||
|
||||
if (theme.hasOwnProperty("help")) {
|
||||
themeSettings.tours = theme.help;
|
||||
}
|
||||
|
||||
return themeApp;
|
||||
},
|
||||
context: async function() {
|
||||
|
|
|
|||
|
|
@ -199,24 +199,25 @@ RED.sidebar.help = (function() {
|
|||
}
|
||||
|
||||
function refreshHelpIndex() {
|
||||
var modules = RED.nodes.registry.getModuleList();
|
||||
var moduleNames = Object.keys(modules);
|
||||
const modules = RED.nodes.registry.getModuleList();
|
||||
const moduleNames = Object.keys(modules);
|
||||
moduleNames.sort();
|
||||
|
||||
var nodeHelp = {
|
||||
const nodeHelp = {
|
||||
label: RED._("sidebar.help.nodeHelp"),
|
||||
children: [],
|
||||
expanded: true
|
||||
};
|
||||
var tours = RED.tourGuide.list().map(function (item) {
|
||||
const tours = RED.tourGuide.list().map(function (item) {
|
||||
return {
|
||||
icon: "fa fa-play-circle-o",
|
||||
label: item.label,
|
||||
tour: item.path,
|
||||
};
|
||||
});
|
||||
var helpData = [
|
||||
{
|
||||
const helpData = []
|
||||
if (RED.settings.theme("help.node-red") !== false) {
|
||||
helpData.push({
|
||||
label: "Node-RED",
|
||||
children: [
|
||||
{
|
||||
|
|
@ -230,9 +231,11 @@ RED.sidebar.help = (function() {
|
|||
}
|
||||
|
||||
]
|
||||
},
|
||||
nodeHelp
|
||||
];
|
||||
})
|
||||
}
|
||||
|
||||
helpData.push(nodeHelp)
|
||||
|
||||
var subflows = RED.nodes.registry.getNodeTypes().filter(function(t) {return /subflow/.test(t)});
|
||||
if (subflows.length > 0) {
|
||||
nodeHelp.children.push({
|
||||
|
|
|
|||
Loading…
Reference in New Issue