diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-09 23:03:39 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-09 23:03:39 +0200 |
commit | 8d5a7eba98fc01999d54ee89d1455ed024801359 (patch) | |
tree | cb870c29da8cf5a181c52d013863f7525a6452bd /src-ui | |
parent | 4db6b3d79b7289717a16603c527bc0d5e3ea0594 (diff) | |
download | FlightCore-8d5a7eba98fc01999d54ee89d1455ed024801359.tar.gz FlightCore-8d5a7eba98fc01999d54ee89d1455ed024801359.zip |
Add initial Northstar install support
still Steam version only
Diffstat (limited to 'src-ui')
-rw-r--r-- | src-ui/src/main.ts | 17 |
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; |