aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/views/DeveloperView.vue48
1 files changed, 47 insertions, 1 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index 6770caaa..b51e1bf1 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -40,6 +40,10 @@
Disable all but core mods
</el-button>
+ <el-button type="primary" @click="forceInstallNorthstar">
+ Force reinstall Northstar
+ </el-button>
+
<el-button type="primary" @click="getInstalledMods">
Get installed mods
</el-button>
@@ -61,6 +65,7 @@ import { invoke } from "@tauri-apps/api";
import { ElNotification } from "element-plus";
import { GameInstall } from "../utils/GameInstall";
import { Store } from 'tauri-plugin-store-api';
+import { ReleaseCanal } from "../utils/ReleaseCanal";
const persistentStore = new Store('flight-core-settings.json');
export default defineComponent({
@@ -207,7 +212,48 @@ export default defineComponent({
await persistentStore.clear();
// ...and save
await persistentStore.save();
- }
+ },
+ async forceInstallNorthstar() {
+ let game_install = {
+ game_path: this.$store.state.game_path,
+ install_type: this.$store.state.install_type
+ } as GameInstall;
+
+ // Send notification telling the user to wait for the process to finish
+ const notification = ElNotification({
+ title: 'Force reinstalling Northstar',
+ message: 'Please wait',
+ duration: 0,
+ type: 'info',
+ position: 'bottom-right'
+ });
+
+ let install_northstar_result = invoke("install_northstar_caller", { gamePath: game_install.game_path, northstarPackageName: ReleaseCanal.RELEASE });
+ await install_northstar_result
+ .then((message) => {
+ // Send notification
+ ElNotification({
+ title: `Done`,
+ message: `Successfully reinstalled Northstar`,
+ type: 'success',
+ position: 'bottom-right'
+ });
+ this.$store.commit('checkNorthstarUpdates');
+ })
+ .catch((error) => {
+ ElNotification({
+ title: 'Error',
+ message: error,
+ type: 'error',
+ position: 'bottom-right'
+ });
+ console.error(error);
+ })
+ .finally(() => {
+ // Clear old notification
+ notification.close();
+ });
+ },
}
});
</script>