|
@@ -594,13 +594,10 @@ const app = Vue.createApp({
|
|
* Add custom config entry to the module
|
|
* Add custom config entry to the module
|
|
*/
|
|
*/
|
|
addConfig() {
|
|
addConfig() {
|
|
- const k = document.getElementById("newConfigKey").value;
|
|
|
|
- const v = document.getElementById("newConfigValue").value;
|
|
|
|
- this.editor.module.config[k] = v;
|
|
|
|
- document.getElementById("newConfigKey").value =
|
|
|
|
- "Configuration";
|
|
|
|
- document.getElementById("newConfigValue").value =
|
|
|
|
- "Value";
|
|
|
|
|
|
+ const k = document.getElementById("newConfigKey").value;
|
|
|
|
+ const v = document.getElementById("newConfigValue").value;
|
|
|
|
+ this.editor.module.config[k] = v;
|
|
|
|
+ this.resetNewConfigInputs();
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -629,8 +626,13 @@ const app = Vue.createApp({
|
|
const module = this.newModule();
|
|
const module = this.newModule();
|
|
module.name = 'New Module';
|
|
module.name = 'New Module';
|
|
module.config = {};
|
|
module.config = {};
|
|
|
|
+ this.resetNewConfigInputs();
|
|
this.addToEditor(module);
|
|
this.addToEditor(module);
|
|
},
|
|
},
|
|
|
|
+ resetNewConfigInputs() {
|
|
|
|
+ document.getElementById("newConfigKey").value = "Configuration";
|
|
|
|
+ document.getElementById("newConfigValue").value = "Value";
|
|
|
|
+ },
|
|
/**
|
|
/**
|
|
* Removes a module from the customModules array
|
|
* Removes a module from the customModules array
|
|
* @param {Object} module the module to remove from the customModules array
|
|
* @param {Object} module the module to remove from the customModules array
|