From 5a6dd6209d669a31b0f97c4fda5ef21187ea6b47 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Wed, 21 Feb 2024 23:21:04 +0100 Subject: refactor: Pass launch options via object (#760) Use the existing defined interface to pass an object to store instead of just a boolean value. Allows for further extending in the future. --- src-vue/src/plugins/store.ts | 12 ++---------- src-vue/src/views/DeveloperView.vue | 7 +++++-- 2 files changed, 7 insertions(+), 12 deletions(-) (limited to 'src-vue/src') diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index 85130c8c..b61ac573 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -173,11 +173,7 @@ export const store = createStore({ } } }, - async launchGame(state: any, no_checks = false) { - const launch_options: NorthstarLaunchOptions = { - launch_via_steam: false, - bypass_checks: no_checks, - }; + async launchGame(state: any, launch_options: NorthstarLaunchOptions = { launch_via_steam: false, bypass_checks: false}) { if (launch_options.bypass_checks) { await invoke("launch_northstar", { gameInstall: state.game_install, launchOptions: launch_options }) @@ -246,11 +242,7 @@ export const store = createStore({ break; } }, - async launchGameSteam(state: any, no_checks = false) { - const launch_options: NorthstarLaunchOptions = { - launch_via_steam: true, - bypass_checks: false, - }; + async launchGameSteam(state: any, launch_options: NorthstarLaunchOptions = { launch_via_steam: true, bypass_checks: false}) { await invoke("launch_northstar", { gameInstall: state.game_install, launchOptions: launch_options }) .then((message) => { showNotification('Success'); diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue index 975ec077..f3847d36 100644 --- a/src-vue/src/views/DeveloperView.vue +++ b/src-vue/src/views/DeveloperView.vue @@ -149,6 +149,7 @@