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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user