aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/components/LocalModCard.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src/components/LocalModCard.vue')
-rw-r--r--src-vue/src/components/LocalModCard.vue15
1 files changed, 2 insertions, 13 deletions
diff --git a/src-vue/src/components/LocalModCard.vue b/src-vue/src/components/LocalModCard.vue
index dd3629f8..f8d0256d 100644
--- a/src-vue/src/components/LocalModCard.vue
+++ b/src-vue/src/components/LocalModCard.vue
@@ -30,7 +30,6 @@
import { defineComponent } from "vue";
import { invoke } from "@tauri-apps/api";
import { NorthstarMod } from "../../../src-tauri/bindings/NorthstarMod";
-import { GameInstall } from "../utils/GameInstall";
import { showErrorNotification, showNotification } from "../utils/ui";
export default defineComponent({
@@ -50,16 +49,10 @@ export default defineComponent({
async updateWhichModsEnabled(mod: NorthstarMod) {
this.global_load_indicator = true;
- // Setup up struct
- let game_install = {
- game_path: this.$store.state.game_path,
- install_type: this.$store.state.install_type
- } as GameInstall;
-
// enable/disable specific mod
try {
await invoke("set_mod_enabled_status", {
- gameInstall: game_install,
+ gameInstall: this.$store.state.game_install,
modName: mod.name,
// Need to set it to the opposite of current state,
// as current state is only updated after command is run
@@ -76,11 +69,7 @@ export default defineComponent({
return true;
},
async deleteMod(mod: NorthstarMod) {
- let game_install = {
- game_path: this.$store.state.game_path,
- install_type: this.$store.state.install_type
- } as GameInstall;
- await invoke("delete_northstar_mod", { gameInstall: game_install, nsmodName: mod.name })
+ await invoke("delete_northstar_mod", { gameInstall: this.$store.state.game_install, nsmodName: mod.name })
.then((message) => {
// Just a visual indicator that it worked
showNotification(this.$t('mods.local.success_deleting', { modName: mod.name }));