aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/plugins/modules
diff options
context:
space:
mode:
authorJan <sentrycraft123@gmail.com>2023-07-24 13:51:34 +0200
committerGitHub <noreply@github.com>2023-07-24 13:51:34 +0200
commit44583f739af9db81751655f7391757a28e949239 (patch)
treea381c8c968833c21a1277052a2d8b605b7ee69c1 /src-vue/src/plugins/modules
parentdac7b0b18ab5a36d3a25154108e9acecc6c5fe93 (diff)
downloadFlightCore-44583f739af9db81751655f7391757a28e949239.tar.gz
FlightCore-44583f739af9db81751655f7391757a28e949239.zip
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 <gecko.eidechse+git@pm.me>
Diffstat (limited to 'src-vue/src/plugins/modules')
-rw-r--r--src-vue/src/plugins/modules/pull_requests.ts4
1 files changed, 2 insertions, 2 deletions
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(