aboutsummaryrefslogtreecommitdiff
path: root/src-ui/src/main.ts
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-09 23:03:39 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-09 23:03:39 +0200
commit8d5a7eba98fc01999d54ee89d1455ed024801359 (patch)
treecb870c29da8cf5a181c52d013863f7525a6452bd /src-ui/src/main.ts
parent4db6b3d79b7289717a16603c527bc0d5e3ea0594 (diff)
downloadFlightCore-8d5a7eba98fc01999d54ee89d1455ed024801359.tar.gz
FlightCore-8d5a7eba98fc01999d54ee89d1455ed024801359.zip
Add initial Northstar install support
still Steam version only
Diffstat (limited to 'src-ui/src/main.ts')
-rw-r--r--src-ui/src/main.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 09c7f057..a9fe0301 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -83,6 +83,23 @@ document.addEventListener("DOMContentLoaded", async function () {
// }
switch (omniButtonEl.textContent) {
+ case "Install":
+ omniButtonEl.textContent = "Installing";
+ await invoke("install_northstar_caller", { gamePath: globalState.gamepath }) as boolean;
+ alert("Done?");
+
+ // TODO: move this to function
+ let northstar_version_number = await invoke("get_northstar_version_number_caller") as string;
+ if (northstar_version_number && northstar_version_number.length > 0) {
+ globalState.installed_northstar_version = northstar_version_number;
+ omniButtonEl.textContent = `Play (${northstar_version_number})`;
+ let northstar_is_outdated = await invoke("check_is_northstar_outdated") as boolean;
+ if (northstar_is_outdated) {
+ omniButtonEl.textContent = "Update";
+ }
+ }
+
+ break;
default:
alert("Not implemented yet");
break;