From 44583f739af9db81751655f7391757a28e949239 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 24 Jul 2023 13:51:34 +0200 Subject: chore: Store `game_path` and `install_type` as `GameInstall` in store (#445) We pass the `GameInstall` object to backend on most calls, yet we store the parameters individually in frontend. This PR resolves that by storing the whole object instead of individual parameters, simplifying a lot of the code that calls the backend. * chore: Store game_path and install_type as GameInstall in store * Add missed uses of old attributes * fix: Update missed attribute in DevView * fix: Update missed attribute in SettingsView * refactor: Update functions to use new object in RepairView * Initialize game_install as empty object --------- Co-authored-by: GeckoEidechse --- src-vue/src/plugins/modules/pull_requests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-vue/src/plugins/modules') diff --git a/src-vue/src/plugins/modules/pull_requests.ts b/src-vue/src/plugins/modules/pull_requests.ts index 57d5fa07..3f3ba259 100644 --- a/src-vue/src/plugins/modules/pull_requests.ts +++ b/src-vue/src/plugins/modules/pull_requests.ts @@ -54,7 +54,7 @@ export const pullRequestModule = { // Send notification telling the user to wait for the process to finish const notification = showNotification(`Installing launcher PR ${pull_request.number}`, 'Please wait', 'info', 0); - await invoke("apply_launcher_pr", { pullRequest: pull_request, gameInstallPath: store.state.game_path }) + await invoke("apply_launcher_pr", { pullRequest: pull_request, gameInstallPath: store.state.game_install.game_path }) .then((message) => { console.log(message); // Show user notification if mod install completed. @@ -72,7 +72,7 @@ export const pullRequestModule = { // Send notification telling the user to wait for the process to finish const notification = showNotification(`Installing mods PR ${pull_request.number}`, 'Please wait', 'info', 0); - await invoke("apply_mods_pr", { pullRequest: pull_request, gameInstallPath: store.state.game_path }) + await invoke("apply_mods_pr", { pullRequest: pull_request, gameInstallPath: store.state.game_install.game_path }) .then((message) => { // Show user notification if mod install completed. showNotification( -- cgit v1.2.3