aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Raes <contact@remyraes.com>2022-10-02 12:00:24 +0200
committerGitHub <noreply@github.com>2022-10-02 12:00:24 +0200
commit2a32f80aedec671d812142cbbe2d0a461a4094e4 (patch)
treefda1d918d7402a01aea50c898a95cc16b9d612f1
parente59529af2dfe8d51a10412dbc108f77c1af87053 (diff)
parent9592ca243489fcc74fb82f4298769ea5b62c2cd8 (diff)
downloadFlightCore-2a32f80aedec671d812142cbbe2d0a461a4094e4.tar.gz
FlightCore-2a32f80aedec671d812142cbbe2d0a461a4094e4.zip
Merge pull request #2 from GeckoEidechse/add-update-functionality
Add update functionality
-rw-r--r--src-vue/src/plugins/store.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 1ee3bfff..7fdc7814 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -59,6 +59,24 @@ export const store = createStore({
return;
}
+ // Update northstar if it is outdated.
+ if (state.northstar_state === NorthstarState.MUST_UPDATE) {
+ // Updating is the same as installing, simply overwrites the existing files
+ let install_northstar_result = invoke("install_northstar_caller", { gamePath: state.game_path, northstarPackageName: ReleaseCanal.RELEASE });
+ state.northstar_state = NorthstarState.UPDATING;
+
+ await install_northstar_result.then((message) => {
+ console.log(message);
+ })
+ .catch((error) => {
+ console.error(error);
+ alert(error);
+ });
+
+ _get_northstar_version_number(state);
+ return;
+ }
+
// Show an error message if Origin is not running.
if (!state.origin_is_running) {
ElNotification({