aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src/plugins')
-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({