Skip to content

Commit

Permalink
Make theme device plugin config override theme common plugin config
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Mar 11, 2024
1 parent 4a6cd94 commit f329bc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions components/PluginsContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ class PluginsContainer extends React.Component {
console.warn("Non-existing plugin: " + pluginConf.name);
return null;
}
const themePluginConfig = this.props.theme?.config?.[this.props.mode]?.plugins ?? this.props.theme?.config?.plugins;
const cfg = {...(pluginConf.cfg || {}), ...(themePluginConfig?.[pluginConf.name] || {})};
const themeDevicePluginConfig = this.props.theme?.config?.[this.props.mode]?.plugins?.[pluginConf.name] || {};
const themePluginConfig = this.props.theme?.config?.plugins?.[pluginConf.name] || {};
const cfg = {...(pluginConf.cfg || {}), ...themePluginConfig, ...themeDevicePluginConfig};
const appCfg = this.props.pluginsAppConfig[pluginConf.name + "Plugin"] || {};
return (<Plugin key={pluginConf.name + idx} {...cfg} {...appCfg} />);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qwc2",
"version": "2024.03.10-master",
"version": "2024.03.11-master",
"description": "QGIS Web Client 2 core",
"author": "Sourcepole AG",
"license": "BSD-2-Clause",
Expand Down

0 comments on commit f329bc6

Please sign in to comment.