add device config to disable changing local port

This commit is contained in:
sparks-alec
2023-01-26 02:25:47 -05:00
parent 333d1c09e9
commit 35245ff17f
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -8,6 +8,7 @@ exports.config = {
remotePort: 53000,
localPort: 53001,
mayChangePorts: true,
mayChangeLocalPort: false,
heartbeatInterval: 100,
heartbeatTimeout: 5000,
searchOptions: {
+6
View File
@@ -184,6 +184,12 @@ function switchDevice(id) {
document.getElementById('device-settings-rx-port').disabled = true;
}
if (activeDevice.plugin.config.mayChangeLocalPort === false) {
document.getElementById('device-settings-rx-port').disabled = true;
} else {
document.getElementById('device-settings-rx-port').disabled = false;
}
if (activeDevice.plugin.config.localPort) {
// document.getElementById('device-settings-port-label').textContent = 'Remote\nPort:';
document.getElementById('device-settings-rx-port-row').style.display = 'table-row';