mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
handle custom local UDP port for domain-server from webpage
This commit is contained in:
parent
2d3f3edcad
commit
14cd044359
3 changed files with 16 additions and 0 deletions
|
@ -33,6 +33,14 @@
|
|||
"label": "None: use the network information I have entered for this domain at data.highfidelity.io"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "port",
|
||||
"label": "Local UDP Port",
|
||||
"help": "This is the local port your domain-server binds to for UDP connections.<br/>Depending on your router, this may need to be changed to run multiple full automatic networking domain-servers in the same network.",
|
||||
"default": "40102",
|
||||
"type": "int",
|
||||
"advanced": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -46,6 +46,11 @@ var viewHelpers = {
|
|||
|
||||
form_group += "<input type='hidden' name='" + setting_name + "' value='" + setting_value + "'>"
|
||||
} else {
|
||||
|
||||
if (input_type == 'integer') {
|
||||
input_type = "text"
|
||||
}
|
||||
|
||||
form_group += "<input type='" + input_type + "' class='form-control' name='" + setting_name +
|
||||
"' placeholder='" + (_.has(setting, 'placeholder') ? setting.placeholder : "") +
|
||||
"' value='" + setting_value + "'" + (isLocked ? " disabled" : "") + "/>"
|
||||
|
|
|
@ -254,11 +254,14 @@ void DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJ
|
|||
QString settingType = groupObject[SETTING_DESCRIPTION_TYPE_KEY].toString();
|
||||
|
||||
const QString INPUT_DOUBLE_TYPE = "double";
|
||||
const QString INPUT_INTEGER_TYPE = "int";
|
||||
|
||||
// make sure the resulting json value has the right type
|
||||
|
||||
if (settingType == INPUT_DOUBLE_TYPE) {
|
||||
settingsVariant[key] = rootValue.toString().toDouble();
|
||||
} else if (settingType == INPUT_INTEGER_TYPE) {
|
||||
settingsVariant[key] = rootValue.toString().toInt();
|
||||
} else {
|
||||
settingsVariant[key] = rootValue.toString();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue