aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 18:44:06 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 18:44:06 +0200
commit53bf9962f5a4294211fcd70a15ee4c92af93e6a7 (patch)
treea261200f8ef0e514a5d77bafe558005b681c9af9
parentda6d571b2f656d6937f604dbd066cd3918a172af (diff)
downloadFlightCore-53bf9962f5a4294211fcd70a15ee4c92af93e6a7.tar.gz
FlightCore-53bf9962f5a4294211fcd70a15ee4c92af93e6a7.zip
Propagate install type to UI
Install type is Steam, Origin, EAPlay
-rw-r--r--dist/index.html1
-rw-r--r--src-ui/src/main.ts4
2 files changed, 5 insertions, 0 deletions
diff --git a/dist/index.html b/dist/index.html
index 9eb4fe0a..eef3b931 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -16,6 +16,7 @@
-->
<button id="omni-button">Loading...</button>
<input value="Couldn't find Titanfall2 install" id="install-location-holder" disabled></input>
+ <install-type-holder>UNKOWN</install-type-holder>
<!-- <div class="hello">Click for Hello</div> -->
<!-- <counter-button>ADD</counter-button> -->
<!-- <counter-result>.</counter-result> -->
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 96481a83..63f73d73 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -87,6 +87,7 @@ document.addEventListener("DOMContentLoaded", async function () {
let panicButtonEl = $("panic-button") as HTMLElement;
let installLocationHolderEl = document.getElementById("install-location-holder") as HTMLInputElement;
let versionNumberHolderEl = $("version-number-holder") as HTMLElement;
+ let installTypeHolderEl = $("install-type-holder") as HTMLElement;
let omniButtonEl = document.getElementById("omni-button") as HTMLElement;
// listen backend-ping event (from Tauri Rust App)
@@ -195,9 +196,12 @@ document.addEventListener("DOMContentLoaded", async function () {
// Change omni-button content based on whether game install was found
omniButtonEl.textContent = button_install_string;
+
installLocationHolderEl.value = game_install_obj.game_path;
globalState.gamepath = game_install_obj.game_path;
+ installTypeHolderEl.textContent = game_install_obj.install_type;
+
// Check installed Northstar version if found
get_northstar_version_number_and_set_button_accordingly(omniButtonEl);
console.log(globalState);