1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

update header url if set in theme and not settings

This commit is contained in:
Steve-Mcl 2022-07-13 20:36:27 +01:00
parent c6cfbb8755
commit 8bd02d0c36

View File

@ -299,7 +299,7 @@ module.exports = {
theme.page._.tabicon.colour = themeContext.page.tabicon.colour theme.page._.tabicon.colour = themeContext.page.tabicon.colour
} }
} }
// if the plugin has a title AND the users settings.js does NOT have a title // if the plugin has a title AND the users settings.js does NOT
if (themePlugin.page.title && !theme.page.title) { if (themePlugin.page.title && !theme.page.title) {
themeContext.page.title = themePlugin.page.title || themeContext.page.title themeContext.page.title = themePlugin.page.title || themeContext.page.title
} }
@ -322,6 +322,10 @@ module.exports = {
if (themePlugin.header.title && !theme.header.title) { if (themePlugin.header.title && !theme.header.title) {
themeContext.header.title = themePlugin.header.title || themeContext.header.title themeContext.header.title = themePlugin.header.title || themeContext.header.title
} }
// if the plugin has a header url AND the users settings.js does NOT
if (themePlugin.header.url && !theme.header.url) {
themeContext.header.url = themePlugin.header.url || themeContext.header.url
}
} }
if(theme.codeEditor) { if(theme.codeEditor) {
theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options); theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options);