aboutsummaryrefslogtreecommitdiff
path: root/src-ui
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 16:49:59 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 16:49:59 +0200
commit209f3372f7ff023a842a8d186130032397e5ad87 (patch)
tree21927aadcc9eab2a5f258dcac9c2221ebd4b24bf /src-ui
parent50a96674c08b3cfd14715789317cf3c7b0e2dffc (diff)
downloadFlightCore-209f3372f7ff023a842a8d186130032397e5ad87.tar.gz
FlightCore-209f3372f7ff023a842a8d186130032397e5ad87.zip
Return error result type if NS update check fails
Diffstat (limited to 'src-ui')
-rw-r--r--src-ui/src/main.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 3b2d2f7d..e733cf4d 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -21,10 +21,17 @@ async function get_northstar_version_number_and_set_button_accordingly(omniButto
if (northstar_version_number && northstar_version_number.length > 0) {
globalState.installed_northstar_version = northstar_version_number;
omniButtonEl.textContent = `${button_play_string} (${northstar_version_number})`;
- let northstar_is_outdated = await invoke("check_is_northstar_outdated", { gamePath: globalState.gamepath }) as boolean;
- if (northstar_is_outdated) {
- omniButtonEl.textContent = button_update_string;
- }
+ await invoke("check_is_northstar_outdated", { gamePath: globalState.gamepath })
+ .then((message) => {
+ console.log(message);
+ if (message) {
+ omniButtonEl.textContent = button_update_string;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ alert(error);
+ });
}
}