aboutsummaryrefslogtreecommitdiff
path: root/src-ui/src
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 19:31:50 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 19:31:50 +0200
commit18cf7fa1daf9ea0f3ba71ad0ee4d857e703bd4b4 (patch)
treebabf8293ddb24d5a51569bdd1a18290bcf2128cd /src-ui/src
parent45a9903b07c71254ebd7d01b09598b6ad9dd68cb (diff)
downloadFlightCore-18cf7fa1daf9ea0f3ba71ad0ee4d857e703bd4b4.tar.gz
FlightCore-18cf7fa1daf9ea0f3ba71ad0ee4d857e703bd4b4.zip
Add initial front-end code for launching Northstar
Diffstat (limited to 'src-ui/src')
-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 63f73d73..70af0999 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -145,6 +145,23 @@ document.addEventListener("DOMContentLoaded", async function () {
get_northstar_version_number_and_set_button_accordingly(omniButtonEl);
break;
+ // Launch Northstar
+ case `${button_play_string} (${globalState.installed_northstar_version})`:
+ let game_install = {
+ game_path: globalState.gamepath,
+ install_type: installTypeHolderEl.textContent
+ } as GameInstall;
+ await invoke("launch_northstar", { gameInstall: game_install })
+ .then((message) => {
+ console.log(message);
+ alert(message);
+ })
+ .catch((error) => {
+ console.error(error);
+ alert(error);
+ });
+ break;
+
// Do nothing when clicked during install/update
case button_in_update_string:
case button_in_install_string: