Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nodes/config/locales/ja/ui_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"expand": "展開"
},
"themes": {
"header": "テーマ"
"header": "テーマ",
"theme": "テーマ"
}
}
}
4 changes: 2 additions & 2 deletions nodes/config/ui_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
14 changes: 6 additions & 8 deletions nodes/config/ui_theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading