aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2024-01-19 15:11:02 +0100
committerGeckoEidechse <gecko.eidechse+git@pm.me>2024-01-19 15:25:22 +0100
commitb00fbee7bd147f825e35a3de4c0b9aeedadac493 (patch)
tree06bb70658865f1d73887f1eebead2b30b87c70b8 /src-vue/src
parenta6abfbbe553f2df30811803d16a7554b51efd3ae (diff)
downloadFlightCore-b00fbee7bd147f825e35a3de4c0b9aeedadac493.tar.gz
FlightCore-b00fbee7bd147f825e35a3de4c0b9aeedadac493.zip
refactor: Pass launch options via object
Currently object only has a single member for bypassing all checks. In the future this would be split up into multiple members for different checks to bypass as well as other options.
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/plugins/store.ts9
-rw-r--r--src-vue/src/utils/LaunchOptions.ts3
-rw-r--r--src-vue/src/views/DeveloperView.vue4
3 files changed, 14 insertions, 2 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index a1a67e2b..f2f772df 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';
@@ -172,7 +173,13 @@ export const store = createStore<FlightCoreStore>({
}
}
},
- async launchGame(state: any, no_checks = false) {
+ async launchGame(state: any, launch_options: LaunchOptions | null = null) {
+ let no_checks = false;
+
+ if (launch_options != null) {
+ no_checks = launch_options.no_checks;
+ }
+
if (no_checks) {
await invoke("launch_northstar", { gameInstall: state.game_install, bypassChecks: no_checks })
.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 aa586e6e..5e835b3e 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -136,6 +136,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";
@@ -206,7 +207,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);