From f329bc66a43a06ba7be1f8f1a330e63c8f402d94 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Mon, 11 Mar 2024 10:02:45 +0100 Subject: [PATCH] Make theme device plugin config override theme common plugin config --- components/PluginsContainer.jsx | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/PluginsContainer.jsx b/components/PluginsContainer.jsx index ac189c32d..d3e6a030d 100644 --- a/components/PluginsContainer.jsx +++ b/components/PluginsContainer.jsx @@ -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 (); }); diff --git a/package.json b/package.json index 2055356a2..b7603af06 100644 --- a/package.json +++ b/package.json @@ -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",