From bba7461bd3d37f51063d160a7adab08b207691bb Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Thu, 27 Jul 2023 10:00:30 -0400 Subject: [PATCH 1/5] fix legacy nametag customisation --- src/utils/theme.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/theme.js b/src/utils/theme.js index be9fc836f7..0e39c70741 100644 --- a/src/utils/theme.js +++ b/src/utils/theme.js @@ -105,7 +105,9 @@ function getCurrentTheme() { function getThemeColor(name) { const theme = getCurrentTheme(); - return theme?.variables?.[name] || DEFAULT_COLORS[name]; + console.log(theme) + // theme?.[name] ensures legacy variables for nametag colors are taken into account + return theme?.variables?.[name] || theme?.[name] || DEFAULT_COLORS[name]; } function updateTextButtonColors() { From e33ad400280d54e45af3f71aeacf768e2375ebc3 Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Thu, 27 Jul 2023 13:17:15 -0400 Subject: [PATCH 2/5] remove logs --- src/utils/theme.js | 5 ++--- webpack.config.js | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/theme.js b/src/utils/theme.js index 0e39c70741..654865114f 100644 --- a/src/utils/theme.js +++ b/src/utils/theme.js @@ -105,9 +105,8 @@ function getCurrentTheme() { function getThemeColor(name) { const theme = getCurrentTheme(); - console.log(theme) - // theme?.[name] ensures legacy variables for nametag colors are taken into account - return theme?.variables?.[name] || theme?.[name] || DEFAULT_COLORS[name]; + // config?.theme?.[name] ensures legacy variables for nametag colors are taken into account + return theme?.variables?.[name] || config?.theme?.[name] || DEFAULT_COLORS[name]; } function updateTextButtonColors() { diff --git a/webpack.config.js b/webpack.config.js index 974c0bd98b..2eaf480407 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -234,7 +234,6 @@ module.exports = async (env, argv) => { /** * Initialize the Webpack build envrionment for the provided environment. */ - if (argv.mode !== "production" || env.bundleAnalyzer) { if (env.loadAppConfig || process.env.LOAD_APP_CONFIG) { if (!env.localDev) { From 292e52936c3d2402529976ba7c3aa6d794135679 Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Thu, 27 Jul 2023 13:18:05 -0400 Subject: [PATCH 3/5] remove new line --- webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack.config.js b/webpack.config.js index 2eaf480407..b3efe43e22 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -234,6 +234,7 @@ module.exports = async (env, argv) => { /** * Initialize the Webpack build envrionment for the provided environment. */ + if (argv.mode !== "production" || env.bundleAnalyzer) { if (env.loadAppConfig || process.env.LOAD_APP_CONFIG) { if (!env.localDev) { From 595edee682e4bebacf8ceadca7a1af32711e062a Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Thu, 27 Jul 2023 13:18:45 -0400 Subject: [PATCH 4/5] remove space --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index b3efe43e22..974c0bd98b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -234,7 +234,7 @@ module.exports = async (env, argv) => { /** * Initialize the Webpack build envrionment for the provided environment. */ - + if (argv.mode !== "production" || env.bundleAnalyzer) { if (env.loadAppConfig || process.env.LOAD_APP_CONFIG) { if (!env.localDev) { From 3e9cf6d112ee5ef25ba9fda91bf157dc8a9f4242 Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Thu, 27 Jul 2023 13:27:00 -0400 Subject: [PATCH 5/5] disable save if warning message --- admin/src/react-components/service-editor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/src/react-components/service-editor.js b/admin/src/react-components/service-editor.js index dcbb811d65..10348f8ae8 100644 --- a/admin/src/react-components/service-editor.js +++ b/admin/src/react-components/service-editor.js @@ -459,6 +459,7 @@ class ConfigurationEditor extends Component { className={this.props.classes.button} variant="contained" color="primary" + disabled={this.state.warningMessage} > Save