Found more JSON properties to change into JavaScript camelCase

This commit is contained in:
the-djmaze 2023-01-26 10:41:55 +01:00
parent b9ef8ae2c9
commit 974350ebee
45 changed files with 361 additions and 412 deletions

View file

@ -41,19 +41,19 @@ export class PluginPopupView extends AbstractViewPopup {
saveCommand() {
const oConfig = {
Id: this.id(),
Settings: {}
id: this.id,
settings: {}
},
setItem = item => {
let value = item.value();
if (false === value || true === value) {
value = value ? 1 : 0;
}
oConfig.Settings[item.Name] = value;
oConfig.settings[item.name] = value;
};
this.config.forEach(oItem => {
if (7 == oItem.Type) {
if (7 == oItem.type) {
// Group
oItem.config.forEach(oSubItem => setItem(oSubItem));
} else {
@ -76,15 +76,15 @@ export class PluginPopupView extends AbstractViewPopup {
this.config([]);
if (oPlugin) {
this.id(oPlugin.Id);
this.name(oPlugin.Name);
this.readme(oPlugin.Readme);
this.id(oPlugin.id);
this.name(oPlugin.name);
this.readme(oPlugin.readme);
const config = oPlugin.Config;
const config = oPlugin.config;
if (arrayLength(config)) {
this.config(
config.map(item => {
if (7 == item.Type) {
if (7 == item.type) {
// Group
item.config.forEach(subItem => {
subItem.value = ko.observable(subItem.value);