save field values with other save data

This commit is contained in:
sparks-alec
2022-12-11 04:45:12 -05:00
parent 419bf52ebb
commit 72601b3c97
3 changed files with 13 additions and 8 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
const { ipcRenderer } = require('electron');
const DEVICE = require('./device.js');
const PLUGINS = require('./plugins.js');
const { saveAll } = require('./saveSlots.js');
// const _ = require('lodash/function');
const pinnedDevices = [];
@@ -216,6 +217,7 @@ function switchDevice(id) {
$elem.onchange = function(e){
activeDevice.fields[field.key] = $elem.value;
field.action(activeDevice);
saveAll();
}
if(field.type=="textinput"){
@@ -328,7 +330,7 @@ module.exports.selectNextDevice = function selectNextDevice() {
function populatePluginLists() {
let typeSelect = '';
let addSelect = '<option value="" disabled selected hidden>+</option>';
let addSelect = '<option value="" disabled selected hidden>&nbsp;+&nbsp;</option>';
Object.keys(PLUGINS.all).forEach((pluginType) => {
const plugin = PLUGINS.all[pluginType];