aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views/DeveloperView.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src/views/DeveloperView.vue')
-rw-r--r--src-vue/src/views/DeveloperView.vue31
1 files changed, 31 insertions, 0 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index 3a7ec8f5..8bcd36ea 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -22,6 +22,10 @@
Disable all but core mods
</el-button>
+ <el-button type="primary" @click="getInstalledMods">
+ Get installed mods
+ </el-button>
+
</div>
</template>
@@ -112,6 +116,33 @@ export default defineComponent({
position: 'bottom-right'
});
});
+ },
+ async getInstalledMods() {
+ let game_install = {
+ game_path: this.$store.state.game_path,
+ install_type: this.$store.state.install_type
+ } as GameInstall;
+ await invoke("get_installed_mods_caller", { gameInstall: game_install }).then((message) => {
+ // Simply console logging for now
+ // In the future we should display the installed mods somewhere
+ console.log(message);
+
+ // Just a visual indicator that it worked
+ ElNotification({
+ title: 'Success',
+ message: "Success",
+ type: 'success',
+ position: 'bottom-right'
+ });
+ })
+ .catch((error) => {
+ ElNotification({
+ title: 'Error',
+ message: error,
+ type: 'error',
+ position: 'bottom-right'
+ });
+ });
}
}
});