From af83121344d4eba8a0c4bcd287b887325c155cce Mon Sep 17 00:00:00 2001 From: Noley Holland Date: Wed, 12 Aug 2026 11:56:51 -0700 Subject: [PATCH] Fix newly created themes color sharing + theme labels --- nodes/config/locales/ja/ui_base.json | 3 ++- nodes/config/ui_base.html | 4 ++-- nodes/config/ui_theme.html | 14 ++++++-------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/nodes/config/locales/ja/ui_base.json b/nodes/config/locales/ja/ui_base.json index 9aa34bb13..b6f9b5639 100644 --- a/nodes/config/locales/ja/ui_base.json +++ b/nodes/config/locales/ja/ui_base.json @@ -26,7 +26,8 @@ "expand": "展開" }, "themes": { - "header": "テーマ" + "header": "テーマ", + "theme": "テーマ" } } } \ No newline at end of file diff --git a/nodes/config/ui_base.html b/nodes/config/ui_base.html index 85a16714d..269c75aca 100644 --- a/nodes/config/ui_base.html +++ b/nodes/config/ui_base.html @@ -919,10 +919,10 @@ // get all themes and determine the next theme number const entries = getConfigNodesByType(['ui-theme']) || [] let counter = entries.length + 1 - themeName = counter === 1 ? c_('themes.defaultTheme') : c_('label.theme') + ` ${counter}` + themeName = counter === 1 ? c_('themes.defaultTheme') : c_('themes.theme') + ` ${counter}` while (entries.find(e => e.name === themeName)) { counter++ - themeName = c_('label.theme') + ` ${counter}` + themeName = c_('themes.theme') + ` ${counter}` } } const themeNode = { diff --git a/nodes/config/ui_theme.html b/nodes/config/ui_theme.html index f7a38654a..9276d6f67 100644 --- a/nodes/config/ui_theme.html +++ b/nodes/config/ui_theme.html @@ -95,22 +95,20 @@ }) }, oneditsave: function () { - // update our config values from the input values + const colors = {} Object.keys(this.colors).forEach((color) => { - // set the value of the input - this.colors[color] = $('#node-config-input-' + color).val() + colors[color] = $('#node-config-input-' + color).val() }) + this.colors = colors - // update our config values from the input values + const sizes = {} Object.keys(this.sizes).forEach((size) => { - // get the value of the key let value = $('#node-config-input-' + size).val() // value is a number, add `px` to the end value += (parseFloat(value).toString() === value) ? 'px' : '' - - // set the value of the input - this.sizes[size] = value + sizes[size] = value }) + this.sizes = sizes }, label: function () { return `${this.name}` || 'UI Theme'