diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-13 22:41:03 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-13 22:41:03 +0200 |
commit | 05b90d289b684e18b418d60e594b4c89423ad0e0 (patch) | |
tree | b566b7a9c8b86c81cf158544e7c6bd6099319a63 | |
parent | ebd65b80f9ae05a3cffeea3677a68e9869cf327c (diff) | |
download | FlightCore-05b90d289b684e18b418d60e594b4c89423ad0e0.tar.gz FlightCore-05b90d289b684e18b418d60e594b4c89423ad0e0.zip |
Show installed Northstar version in separate field
-rw-r--r-- | dist/index.html | 1 | ||||
-rw-r--r-- | src-ui/src/main.ts | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/dist/index.html b/dist/index.html index 755fad3b..14592dff 100644 --- a/dist/index.html +++ b/dist/index.html @@ -15,6 +15,7 @@ The functionality it serves and what it displays is based on the current state of the application --> <button id="omni-button">Loading...</button> + <northstar-version-holder>Unknown Northstar version</northstar-version-holder> <input value="Couldn't find Titanfall2 install" id="install-location-holder" disabled></input> <install-type-holder>UNKOWN</install-type-holder> <origin-running-holder>ORIGIN STATUS UNKOWN</origin-running-holder> diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts index 72556181..f8a0a254 100644 --- a/src-ui/src/main.ts +++ b/src-ui/src/main.ts @@ -28,6 +28,11 @@ async function get_northstar_version_number_and_set_button_accordingly(omniButto let northstar_version_number = await invoke("get_northstar_version_number_caller", { gamePath: globalState.gamepath }) as string; if (northstar_version_number && northstar_version_number.length > 0) { globalState.installed_northstar_version = northstar_version_number; + + // Show installed Northstar version + let northstarVersionHolderEl = $("northstar-version-holder") as HTMLElement; + northstarVersionHolderEl.textContent = `Installed Northstar version: v${globalState.installed_northstar_version}`; + omniButtonEl.textContent = `${button_play_string} (v${northstar_version_number})`; await invoke("check_is_northstar_outdated", { gamePath: globalState.gamepath }) .then((message) => { @@ -91,6 +96,7 @@ document.addEventListener("DOMContentLoaded", async function () { let installTypeHolderEl = $("install-type-holder") as HTMLElement; let omniButtonEl = document.getElementById("omni-button") as HTMLElement; let originRunningHolderEl = $("origin-running-holder") as HTMLElement; + let northstarVersionHolderEl = $("northstar-version-holder") as HTMLElement; // listen backend-ping event (from Tauri Rust App) listen("backend-ping", function (evt: TauriEvent<any>) { |