aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-vue/src/plugins/store.ts10
-rw-r--r--src-vue/src/utils/LaunchOptions.ts3
-rw-r--r--src-vue/src/views/DeveloperView.vue4
3 files changed, 15 insertions, 2 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 6c382e0c..e858af00 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -6,6 +6,7 @@ import { invoke } from "@tauri-apps/api";
import { GameInstall } from "../utils/GameInstall";
import { ReleaseCanal } from "../utils/ReleaseCanal";
import { FlightCoreVersion } from "../../../src-tauri/bindings/FlightCoreVersion";
+import { LaunchOptions } from "../utils/LaunchOptions";
import { NotificationHandle } from 'element-plus';
import { NorthstarState } from '../utils/NorthstarState';
import { appDir } from '@tauri-apps/api/path';
@@ -173,12 +174,19 @@ export const store = createStore<FlightCoreStore>({
}
}
},
- async launchGame(state: any, no_checks = false) {
+ async launchGame(state: any, passed_launch_options: LaunchOptions | null = null) {
+ let no_checks = false;
+
+ if (passed_launch_options != null) {
+ no_checks = passed_launch_options.no_checks;
+ }
+
const launch_options: NorthstarLaunchOptions = {
launch_via_steam: false,
bypass_checks: no_checks,
};
+
if (launch_options.bypass_checks) {
await invoke("launch_northstar", { gameInstall: state.game_install, launchOptions: launch_options })
.then((message) => {
diff --git a/src-vue/src/utils/LaunchOptions.ts b/src-vue/src/utils/LaunchOptions.ts
new file mode 100644
index 00000000..801dfaf9
--- /dev/null
+++ b/src-vue/src/utils/LaunchOptions.ts
@@ -0,0 +1,3 @@
+export interface LaunchOptions {
+ no_checks: boolean,
+}
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index 8780ff29..869de2f8 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -149,6 +149,7 @@
<script lang="ts">
import { defineComponent } from "vue";
import { invoke } from "@tauri-apps/api";
+import { LaunchOptions } from "../utils/LaunchOptions";
import { TagWrapper } from "../../../src-tauri/bindings/TagWrapper";
import { NorthstarThunderstoreReleaseWrapper } from "../../../src-tauri/bindings/NorthstarThunderstoreReleaseWrapper";
import PullRequestsSelector from "../components/PullRequestsSelector.vue";
@@ -220,7 +221,8 @@ export default defineComponent({
});
},
async launchGameWithoutChecks() {
- this.$store.commit('launchGame', true);
+ let launch_options: LaunchOptions = { no_checks: true };
+ this.$store.commit('launchGame', launch_options);
},
async launchGameViaSteam() {
this.$store.commit('launchGameSteam', true);