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:
@@ -360,6 +360,21 @@
|
|||||||
'tagstartstop': 'Present tag once to start, present again to stop playback'
|
'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': {
|
'root.IDLE_TIMEOUT_SECS': {
|
||||||
'input-type': 'number'
|
'input-type': 'number'
|
||||||
},
|
},
|
||||||
@@ -439,7 +454,7 @@
|
|||||||
|
|
||||||
let val = input.value.trim();
|
let val = input.value.trim();
|
||||||
if (val === "") val = null;
|
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;
|
current[path[path.length - 1]] = val;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user