mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
feat: added ability to change and check SRS port in manager
This commit is contained in:
parent
42cfb36c04
commit
be879e3660
@ -44,6 +44,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group srs-port port-input">
|
||||
<span>SRS port
|
||||
<img src="./icons/circle-info-solid.svg"
|
||||
title="This port is used by Olympus to communicate with SRS server. Unless you run multiple servers, the default value should be ok, otherwise edit it to be equal to your SRS server port.">
|
||||
</span>
|
||||
<div>
|
||||
<input type="number" min="1024" max="65535" value="<%= activeInstance["SRSPort"] %>"
|
||||
onchange="signal('onSRSPortChanged', this.value)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group backend-address">
|
||||
<span onclick="signal('onEnableAPIClicked')">
|
||||
<div class="checkbox"></div> Enable direct backend API connection
|
||||
|
||||
@ -66,6 +66,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group srs-port port-input">
|
||||
<span>SRS port
|
||||
<img src="./icons/circle-info-solid.svg"
|
||||
title="This port is used by Olympus to communicate with SRS server. Unless you run multiple servers, the default value should be ok, otherwise edit it to be equal to your SRS server port.">
|
||||
</span>
|
||||
<div>
|
||||
<input type="number" min="1024" max="65535" value="<%= activeInstance["SRSPort"] %>"
|
||||
onchange="signal('onSRSPortChanged', this.value)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group backend-address">
|
||||
<span onclick="signal('onEnableAPIClicked')">
|
||||
<div class="checkbox"></div> Enable direct backend API connection
|
||||
|
||||
@ -92,6 +92,10 @@
|
||||
<div>Backend address</div>
|
||||
<div> <%= instances[i].installed? instances[i].backendAddress: "N/A" %> </div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div>SRS port</div>
|
||||
<div> <%= instances[i].installed? instances[i].SRSPort: "N/A" %> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="instance-buttons">
|
||||
|
||||
@ -150,6 +150,7 @@ class DCSInstance {
|
||||
blueCommanderPasswordEdited = false;
|
||||
redCommanderPasswordEdited = false;
|
||||
autoconnectWhenLocal = false;
|
||||
SRSPort = 5002;
|
||||
|
||||
constructor(folder) {
|
||||
this.folder = folder;
|
||||
@ -186,6 +187,7 @@ class DCSInstance {
|
||||
this.backendAddress = config["backend"]["address"];
|
||||
this.gameMasterPasswordHash = config["authentication"]["gameMasterPassword"];
|
||||
this.autoconnectWhenLocal = config["frontend"]["autoconnectWhenLocal"];
|
||||
this.SRSPort = config["audio"]["SRSPort"];
|
||||
|
||||
this.gameMasterPasswordEdited = false;
|
||||
this.blueCommanderPasswordEdited = false;
|
||||
|
||||
@ -164,6 +164,7 @@ async function applyConfiguration(folder, instance) {
|
||||
config["frontend"]["autoconnectWhenLocal"] = instance.autoconnectWhenLocal;
|
||||
config["backend"]["port"] = instance.backendPort;
|
||||
config["backend"]["address"] = instance.backendAddress;
|
||||
config["audio"]["SRSPort"] = instance.SRSPort;
|
||||
|
||||
if (instance.gameMasterPassword !== "")
|
||||
config["authentication"]["gameMasterPassword"] = sha256(instance.gameMasterPassword);
|
||||
|
||||
@ -517,6 +517,11 @@ class Manager {
|
||||
this.setPort('backend', Number(value));
|
||||
}
|
||||
|
||||
/* When the srs port input value is changed */
|
||||
async onSRSPortChanged(value) {
|
||||
this.getActiveInstance().SRSPort = Number(value);
|
||||
}
|
||||
|
||||
/* When the "Enable API connection" checkbox is clicked */
|
||||
async onEnableAPIClicked() {
|
||||
if (this.getActiveInstance()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user