fix: Autoconnect when local checkbox not reflecting configuration

This commit is contained in:
Davide Passoni 2025-03-13 09:39:34 +01:00
parent 34f9a8bc40
commit 760fe18cc7
2 changed files with 2 additions and 1 deletions

View File

@ -190,7 +190,7 @@ class DCSInstance {
this.gameMasterPasswordHash = config["authentication"]["gameMasterPassword"];
/* Read the new configurations added in v2.0.0 */
if ( config["frontend"]["autoconnectWhenLocal"] !== undefined)
if (config["frontend"]["autoconnectWhenLocal"] !== undefined)
this.autoconnectWhenLocal = config["frontend"]["autoconnectWhenLocal"];
if (config["frontend"]["audio"] !== undefined && config["frontend"]["audio"]["SRSPort"] !== undefined)
this.SRSPort = config["audio"]["SRSPort"];

View File

@ -159,6 +159,7 @@ class Manager {
if (this.getActiveInstance()) {
this.setPort('frontend', this.getActiveInstance().frontendPort);
this.setPort('backend', this.getActiveInstance().backendPort);
this.expertSettingsPage.getElement().querySelector(".autoconnect .checkbox").classList.toggle("checked", this.getActiveInstance().autoconnectWhenLocal)
}
}