fix: frontend: don't convert text that looks like an integer to integers

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
This commit is contained in:
2025-12-23 11:44:31 +01:00
parent b9baa1c7d5
commit d3aef1be32

View File

@@ -360,6 +360,21 @@
'tagstartstop': 'Present tag once to start, present again to stop playback'
}
},
'root.BUTTON_MAP.NEXT': {
'input-type': 'number'
},
'root.BUTTON_MAP.PREV': {
'input-type': 'number'
},
'root.BUTTON_MAP.VOLUP': {
'input-type': 'number'
},
'root.BUTTON_MAP.VOLDOWN': {
'input-type': 'number'
},
'root.BUTTON_MAP.PLAY_PAUSE': {
'input-type': 'number'
},
'root.IDLE_TIMEOUT_SECS': {
'input-type': 'number'
},
@@ -439,7 +454,7 @@
let val = input.value.trim();
if (val === "") val = null;
else if (!isNaN(val)) val = Number(val);
else if (!isNaN(val) && input.type != 'text') val = Number(val);
current[path[path.length - 1]] = val;
});