From 6adf72c6086a39d11064e09c69f28e2a6fc41a79 Mon Sep 17 00:00:00 2001 From: CakeLancelot Date: Wed, 23 Dec 2020 11:03:06 -0600 Subject: [PATCH] "Final" changes * Remove placeholder option for version and let the first available one get selected instead * Remove git hash in favor of just release version (this should probably be set dynamically at some point) * Clarify comments --- resources/app/files/assets/js/serverselector.js | 7 ++++--- resources/app/files/index.html | 6 ++---- resources/app/index.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/resources/app/files/assets/js/serverselector.js b/resources/app/files/assets/js/serverselector.js index a25b2b0..1e1efb6 100644 --- a/resources/app/files/assets/js/serverselector.js +++ b/resources/app/files/assets/js/serverselector.js @@ -65,7 +65,7 @@ function loadServerList() { serverarray = serverjson['servers']; $(".server-listing-entry").remove(); // Clear out old stuff, if any - disableServerListButtons(); // Disable buttons until another is selected + disableServerListButtons(); // Disable buttons until another server is selected if (serverarray.length > 0) { // Servers were found in the JSON @@ -95,7 +95,7 @@ function loadServerList() { function setGameInfo(serverUUID) { var result = serverarray.filter(function(obj) {return (obj.uuid === serverUUID);})[0]; var gameversion = versionarray.filter(function(obj) {return (obj.name === result.version);})[0]; - window.asseturl = gameversion.url + window.asseturl = gameversion.url // gameclient.js needs to access this remotefs.writeFileSync(__dirname+"\\assetInfo.php", asseturl); remotefs.writeFileSync(__dirname+"\\loginInfo.php", result.ip); @@ -107,8 +107,8 @@ function setGameInfo(serverUUID) { remotefs.writeFileSync(__dirname+"\\sponsor.php", httpendpoint+"upsell/sponsor.png"); remotefs.writeFileSync(__dirname+"\\images.php", httpendpoint+"upsell/"); } else { + // Remove/default the endpoint related stuff, this server won't be using it if (remotefs.existsSync(__dirname+"\\rankurl.txt")) { - // delete the file, this server won't be using it remotefs.unlinkSync(__dirname+"\\rankurl.txt"); remotefs.writeFileSync(__dirname+"\\sponsor.php", "assets/img/welcome.png"); remotefs.writeFileSync(__dirname+"\\images.php", "assets/img/"); @@ -143,6 +143,7 @@ $('#server-table').on('click', '.server-listing-entry', function(event) { $(this).addClass('bg-primary').siblings().removeClass('bg-primary'); }); +// QoL feature: if you double click on a server it will connect $('#server-table').on('dblclick', '.server-listing-entry', function(event) { $(this).addClass('bg-primary').siblings().removeClass('bg-primary'); connectToServer(); diff --git a/resources/app/files/index.html b/resources/app/files/index.html index c76efb8..c37298c 100644 --- a/resources/app/files/index.html +++ b/resources/app/files/index.html @@ -50,7 +50,7 @@ diff --git a/resources/app/index.js b/resources/app/index.js index 3e2b92a..bde790f 100644 --- a/resources/app/index.js +++ b/resources/app/index.js @@ -94,5 +94,5 @@ function showMainWindow() { mainWindow.webContents.executeJavaScript("loadServerList();"); }); - mainWindow.webContents.openDevTools() + //mainWindow.webContents.openDevTools() }