aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-09 22:15:15 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-09 22:15:15 +0200
commit289f7511f9bebf2600199de11ebc4dcdbbccc93c (patch)
tree2e12e78628cbb46bfc051005c19ef2518a567485
parente20bcc18e9ab82382f7736cc046f6478cf8c5f52 (diff)
downloadFlightCore-289f7511f9bebf2600199de11ebc4dcdbbccc93c.tar.gz
FlightCore-289f7511f9bebf2600199de11ebc4dcdbbccc93c.zip
Comment out testing code
-rw-r--r--src-ui/src/main.ts94
1 files changed, 47 insertions, 47 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 4a00f5a6..c92ddce5 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -34,53 +34,53 @@ document.addEventListener("DOMContentLoaded", async function () {
// omni button click
omniButtonEl.addEventListener("click", async function () {
- // Check if Titanfall2 install path as found
- let install_location = await invoke("find_game_install_location_caller") as string;
- if (!(install_location && install_location.length > 0)) {
- alert("Titanfall2 install not found");
- // Open a selection dialog for directories
- const selected = await open({
- directory: true,
- multiple: false,
- defaultPath: await appDir(),
- });
- if (Array.isArray(selected)) {
- // user selected multiple directories
- alert("Please only select a single directory");
- } else if (selected === null) {
- // user cancelled the selection
- } else {
- // user selected a single directory
- alert(selected);
-
-
- // TODO Verify if valid Titanfall2 install location
- let is_valid_titanfall2_install = await invoke("verify_install_location", { gamePath: selected }) as boolean;
- if (is_valid_titanfall2_install) {
- globalState.gamepath = selected;
-
- // Update omni-button
- omniButtonEl.textContent = "Install";
-
- // Check for Northstar install
- 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})`;
- // Check for updated Northstar
- let northstar_is_outdated = await invoke("check_is_northstar_outdated") as boolean;
- if (northstar_is_outdated) {
- omniButtonEl.textContent = "Update";
- }
- }
- }
- else {
- // Not valid Titanfall2 install
- alert("Not a valid Titanfall2 install");
- }
- }
- return;
- }
+ // // Check if Titanfall2 install path as found
+ // let install_location = await invoke("find_game_install_location_caller") as string;
+ // if (!(install_location && install_location.length > 0)) {
+ // alert("Titanfall2 install not found");
+ // // Open a selection dialog for directories
+ // const selected = await open({
+ // directory: true,
+ // multiple: false,
+ // defaultPath: await appDir(),
+ // });
+ // if (Array.isArray(selected)) {
+ // // user selected multiple directories
+ // alert("Please only select a single directory");
+ // } else if (selected === null) {
+ // // user cancelled the selection
+ // } else {
+ // // user selected a single directory
+ // alert(selected);
+
+
+ // // TODO Verify if valid Titanfall2 install location
+ // let is_valid_titanfall2_install = await invoke("verify_install_location", { gamePath: selected }) as boolean;
+ // if (is_valid_titanfall2_install) {
+ // globalState.gamepath = selected;
+
+ // // Update omni-button
+ // omniButtonEl.textContent = "Install";
+
+ // // Check for Northstar install
+ // 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})`;
+ // // Check for updated Northstar
+ // let northstar_is_outdated = await invoke("check_is_northstar_outdated") as boolean;
+ // if (northstar_is_outdated) {
+ // omniButtonEl.textContent = "Update";
+ // }
+ // }
+ // }
+ // else {
+ // // Not valid Titanfall2 install
+ // alert("Not a valid Titanfall2 install");
+ // }
+ // }
+ // return;
+ // }
alert("TODO");
});