aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2022-11-27 21:29:38 +0100
committerGitHub <noreply@github.com>2022-11-27 21:29:38 +0100
commit13ff1b0a50fa94d4f35ee1868ef3874a619f4165 (patch)
tree72e76d437df02b5d223fb3ade27acc1ad5d9992e /src-vue/src
parent197ce5dc69dcb08a052492361f884d15d2dfd6a7 (diff)
downloadFlightCore-13ff1b0a50fa94d4f35ee1868ef3874a619f4165.tar.gz
FlightCore-13ff1b0a50fa94d4f35ee1868ef3874a619f4165.zip
feat: Option to launch NS bypassing update check (#59)
* feat: Option to launch NS bypassing update check Hidden behind dev view * refactor: Use existing function to launch NS Instead of duplicating code * feat: Adjust button to allow bypassing all checks
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/plugins/store.ts26
-rw-r--r--src-vue/src/views/DeveloperView.vue6
2 files changed, 26 insertions, 6 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 11240ea6..2d7df80c 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -135,7 +135,26 @@ export const store = createStore<FlightCoreStore>({
}
}
},
- async launchGame(state: any) {
+ async launchGame(state: any, no_checks = false) {
+ let game_install = {
+ game_path: state.game_path,
+ install_type: state.install_type
+ } as GameInstall;
+
+ if (no_checks) {
+ await invoke("launch_northstar_caller", { gameInstall: game_install, bypassChecks: no_checks })
+ .then((message) => {
+ console.log("Launched with bypassed checks");
+ console.log(message);
+ })
+ .catch((error) => {
+ console.error(error);
+ alert(error);
+ });
+
+ return;
+ }
+
// TODO update installation if release track was switched
switch (state.northstar_state) {
// Install northstar if it wasn't detected.
@@ -185,11 +204,6 @@ export const store = createStore<FlightCoreStore>({
// If Origin isn't running, end here
return;
}
-
- let game_install = {
- game_path: state.game_path,
- install_type: state.install_type
- } as GameInstall;
await invoke("launch_northstar_caller", { gameInstall: game_install })
.then((message) => {
console.log(message);
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index 780dc2ea..3622a596 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -22,6 +22,9 @@
Toggle Release Candidate
</el-button>
+ <el-button type="primary" @click="launchGameWithoutChecks">
+ Launch Northstar (bypass all checks)
+ </el-button>
<h3>Mod install:</h3>
@@ -122,6 +125,9 @@ export default defineComponent({
position: 'bottom-right'
});
},
+ async launchGameWithoutChecks() {
+ this.$store.commit('launchGame', true);
+ },
async disableAllModsButCore() {
let game_install = {
game_path: this.$store.state.game_path,