From 975c9ffbbed337ce40f6922c86249225ab779075 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Mon, 29 Aug 2022 22:21:45 +0200 Subject: Check installed Northstar version --- src-ui/src/main.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src-ui') diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts index eccd1919..127aa119 100644 --- a/src-ui/src/main.ts +++ b/src-ui/src/main.ts @@ -62,6 +62,15 @@ document.addEventListener("DOMContentLoaded", async function () { omniButtonEl.textContent = "Install"; installLocationHolderEl.textContent = install_location; globalState.gamepath = install_location; + + // Check installed Northstar version if found + 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" + // TODO check if version is newest + } + console.log(globalState); } else { omniButtonEl.textContent = "Find Titanfall2 install location"; -- cgit v1.2.3