aboutsummaryrefslogtreecommitdiff
path: root/src-ui
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-24 17:30:04 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-24 17:30:04 +0200
commitc0b597f1bfaa63153a337eb7280fbbb4fa7b824a (patch)
treed736458f4f7c2d2bca6cede8cfcffbd433858715 /src-ui
parent468d843b2eaf0f9f3de00177a79420313c9fc3ed (diff)
downloadFlightCore-c0b597f1bfaa63153a337eb7280fbbb4fa7b824a.tar.gz
FlightCore-c0b597f1bfaa63153a337eb7280fbbb4fa7b824a.zip
Add code skeleton to verify game files
Once done, should help with some tickets.
Diffstat (limited to 'src-ui')
-rw-r--r--src-ui/src/main.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 3b47e6f4..5648605c 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -99,6 +99,7 @@ document.addEventListener("DOMContentLoaded", async function () {
let originRunningHolderEl = $("origin-running-holder") as HTMLElement;
let northstarVersionHolderEl = $("northstar-version-holder") as HTMLElement;
let useReleaseCandidateCheckboxEl = document.getElementById("use-release-candidate-checkbox") as HTMLInputElement;
+ let verifyGameFilesButtonEl = document.getElementById("verify-game-files-button") as HTMLElement;
useReleaseCandidateCheckboxEl.addEventListener('change', async function () {
// Switch between main release and release candidates
@@ -227,6 +228,23 @@ document.addEventListener("DOMContentLoaded", async function () {
}
});
+ // Handles verify button click
+ verifyGameFilesButtonEl.addEventListener("click", async function () {
+ let game_install = {
+ game_path: globalState.gamepath,
+ install_type: installTypeHolderEl.textContent
+ } as GameInstall;
+ await invoke("verify_game_files_caller", { gameInstall: game_install })
+ .then((message) => {
+ // Found some gamepath
+ console.log(message);
+ })
+ .catch((error) => {
+ console.error(error);
+ alert(error);
+ });
+ });
+
// panic button click
panicButtonEl.addEventListener("pointerup", async function () {
await invoke("force_panic");