From 40bba8b31cfbef319553920d9fa678ffc1a99597 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Thu, 30 Dec 2021 03:43:37 +0100 Subject: version now refreshes, fixed and renamed stuff The version now refreshes when you update/install Northstar, I renamed vpVersion/nsVersion to just vpversion/nsversion and getInstalledVersion() to getNSVersion(), removed uses of getElementById() with just the ID. I also added English localization. The versions text color is now bound by a CSS variable (we may use it in the future again). I'm also not sure what the point of `style="white-space: nowrap;"` was, as I don't see much of a difference? Rather instead use `` in the lang file if needed. Besides that I did tiny code cleanup. --- src/app/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/app/main.js') diff --git a/src/app/main.js b/src/app/main.js index 765b143..59b28f2 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -35,9 +35,9 @@ ipcRenderer.on("newpath", (event, newpath) => { settings.gamepath = newpath; }) -ipcRenderer.on("version", (_, payload) => { - document.getElementById("vpVersion").innerText = "Viper version:" + payload.vp; - document.getElementById("nsVersion").innerText = "Northstar version: " + payload.ns; +ipcRenderer.on("version", (event, versions) => { + vpversion.innerText = lang("gui.versions.viper") + ": " + versions.vp; + nsversion.innerText = lang("gui.versions.northstar") + ": " + versions.ns; }); ipcRenderer.send("getversion"); -- cgit v1.2.3