diff --git a/assets/css/openfusion.css b/assets/css/openfusion.css index 911dc76..208fe2d 100644 --- a/assets/css/openfusion.css +++ b/assets/css/openfusion.css @@ -54,7 +54,7 @@ body { "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } -#of-versionnumber { +#of-versionnumberdiv { position: fixed; bottom: 4px; right: 8px; diff --git a/assets/js/serverselector.js b/assets/js/serverselector.js index 05e1e71..0c38438 100644 --- a/assets/js/serverselector.js +++ b/assets/js/serverselector.js @@ -25,6 +25,23 @@ function disableServerListButtons() { $("#of-deleteserver-button").prop("disabled", true); } +function getAppVersion() { + appversion = remote.require("app").getVersion(); + + // simplify version, ex. 1.4.0 -> 1.4, + // but only if a revision number isn't present + if(appversion.endsWith(".0")){ + return appversion.substr(0, appversion.length - 2) + } else { + return appversion + } +} + +function setAppVersionText() { + $("#of-aboutversionnumber").text("Version " + getAppVersion()); + $("#of-versionnumber").text("v" + getAppVersion()); +} + function addServer() { var jsontomodify = JSON.parse( remotefs.readFileSync(userdir + "\\servers.json") diff --git a/build/afterpack.js b/build/afterpack.js index 4ce113e..b142d88 100644 --- a/build/afterpack.js +++ b/build/afterpack.js @@ -1,5 +1,5 @@ const fs = require('fs'); -const dir = './dist/win-ia32-unpacked/resources/default_app' +const defaultdir = './dist/win-ia32-unpacked/resources/default_app' const exefile = './dist/win-ia32-unpacked/OpenFusionClient.exe' exports.default = function() { diff --git a/index.html b/index.html index ed17e0c..53c771f 100644 --- a/index.html +++ b/index.html @@ -151,7 +151,7 @@ -
+
v1.4v0
diff --git a/index.js b/index.js index f038cc6..3715fc2 100644 --- a/index.js +++ b/index.js @@ -174,6 +174,7 @@ function showMainWindow() { // Reduces white flash when opening the program mainWindow.webContents.on("did-finish-load", function () { + mainWindow.webContents.executeJavaScript("setAppVersionText();"); mainWindow.show(); // everything's loaded, tell the renderer process to do its thing mainWindow.webContents.executeJavaScript("loadConfig();"); diff --git a/package.json b/package.json index 8c4aeec..b89c9b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "OpenFusionClient", - "version": "1.4.0", + "version": "1.4.1", "description": "OpenFusionClient", "main": "index.js", "scripts": {