diff options
Diffstat (limited to 'src-vue')
-rw-r--r-- | src-vue/src/plugins/store.ts | 9 | ||||
-rw-r--r-- | src-vue/src/utils/LaunchOptions.ts | 3 | ||||
-rw-r--r-- | src-vue/src/views/DeveloperView.vue | 4 |
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); |