diff --git a/gaseous-server/Controllers/V1.0/SystemController.cs b/gaseous-server/Controllers/V1.0/SystemController.cs index b3bd011..74c9ce9 100644 --- a/gaseous-server/Controllers/V1.0/SystemController.cs +++ b/gaseous-server/Controllers/V1.0/SystemController.cs @@ -72,10 +72,50 @@ namespace gaseous_server.Controllers [MapToApiVersion("1.1")] [HttpGet] [Route("Version")] - [ProducesResponseType(StatusCodes.Status200OK)] - public Version GetSystemVersion() + [ProducesResponseType(typeof(Dictionary), StatusCodes.Status200OK)] + public ActionResult GetSystemVersion() { - return Assembly.GetExecutingAssembly().GetName().Version; + Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); + + // get age ratings dictionary + Dictionary ClassificationBoardsStrings = new Dictionary(); + foreach (IGDB.Models.AgeRatingCategory ageRatingCategory in Enum.GetValues(typeof(IGDB.Models.AgeRatingCategory))) + { + ClassificationBoardsStrings.Add((int)ageRatingCategory, ageRatingCategory.ToString()); + } + + Dictionary AgeRatingsStrings = new Dictionary(); + foreach (IGDB.Models.AgeRatingTitle ageRatingTitle in Enum.GetValues(typeof(IGDB.Models.AgeRatingTitle))) + { + AgeRatingsStrings.Add((int)ageRatingTitle, ageRatingTitle.ToString()); + } + + Dictionary retVal = new Dictionary + { + { + "AppVersion", Assembly.GetExecutingAssembly().GetName().Version.ToString() + }, + { + "DBSchemaVersion", db.GetDatabaseSchemaVersion().ToString() + }, + { + "FirstRunStatus", Config.ReadSetting("FirstRunStatus", "0") + }, + { + "AgeRatingBoardsStrings", ClassificationBoardsStrings + }, + { + "AgeRatingStrings", AgeRatingsStrings + }, + { + "AgeRatingGroups", AgeGroups.AgeGroupingsFlat + }, + { + "emulatorDebugMode", Config.ReadSetting("emulatorDebugMode", false.ToString()).ToLower() + } + }; + + return Ok(retVal); } [MapToApiVersion("1.0")] diff --git a/gaseous-server/wwwroot/index.html b/gaseous-server/wwwroot/index.html index 519932d..42f68de 100644 --- a/gaseous-server/wwwroot/index.html +++ b/gaseous-server/wwwroot/index.html @@ -3,7 +3,11 @@ - + + + + + @@ -21,11 +25,6 @@ ]; let scriptLinks = [ - "/scripts/jquery-3.6.0.min.js", - "/scripts/jquery.lazy.min.js", - "/scripts/jquery.lazy.plugins.min.js", - "/scripts/moment-with-locales.min.js", - "/scripts/select2.min.js", "/scripts/filterformating.js", "/scripts/gamesformating.js", "/scripts/main.js", @@ -60,31 +59,21 @@