aboutsummaryrefslogtreecommitdiff
path: root/src-ui/src
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-08-29 01:00:10 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-08-29 01:00:10 +0200
commit9a23a8d68cfa3477b55778818d7d06b468f9b5ca (patch)
tree551c1de1de39997858d69258091e83a67e12057b /src-ui/src
parentdd4f758daf0203e31d87da2e3fbdee4f09540828 (diff)
downloadFlightCore-9a23a8d68cfa3477b55778818d7d06b468f9b5ca.tar.gz
FlightCore-9a23a8d68cfa3477b55778818d7d06b468f9b5ca.zip
Get game install location on application load
Diffstat (limited to 'src-ui/src')
-rw-r--r--src-ui/src/main.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index e769a1b5..e5149bdd 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -14,13 +14,6 @@ document.addEventListener("DOMContentLoaded", async function () {
let versionNumberHolderEl = $("version-number-holder") as HTMLElement;
// listen backend-ping event (from Tauri Rust App)
- listen("install-location-result", function (evt: TauriEvent<string>) {
- // alert(evt.payload);
- // result = evt as String;
- installLocationHolderEl.textContent = evt.payload;
- })
-
- // listen backend-ping event (from Tauri Rust App)
listen("backend-ping", function (evt: TauriEvent<any>) {
pingEl.classList.add("on");
setTimeout(function () {
@@ -50,6 +43,11 @@ document.addEventListener("DOMContentLoaded", async function () {
});
// Run the following on initial page load
+ // Get version number
let version_number_string = await invoke("get_version_number") as string;
versionNumberHolderEl.textContent = version_number_string;
+
+ // Get install location
+ let install_location = await invoke("find_game_install_location") as string;
+ installLocationHolderEl.textContent = install_location;
})