aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views/ModsView.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src/views/ModsView.vue')
-rw-r--r--src-vue/src/views/ModsView.vue8
1 files changed, 7 insertions, 1 deletions
diff --git a/src-vue/src/views/ModsView.vue b/src-vue/src/views/ModsView.vue
index 00522bf5..b1d1aeff 100644
--- a/src-vue/src/views/ModsView.vue
+++ b/src-vue/src/views/ModsView.vue
@@ -3,7 +3,8 @@
<el-scrollbar>
<h3>Installed Mods:</h3>
<div>
- <el-card shadow="hover" v-for="mod in $store.state.installed_mods">
+ <p v-if="installedMods.length === 0">No mods were found.</p>
+ <el-card v-else shadow="hover" v-for="mod in installedMods" v-bind:key="mod.name">
<el-switch style="--el-switch-on-color: #13ce66; --el-switch-off-color: #8957e5" v-model="mod.enabled"
:before-change="() => updateWhichModsEnabled(mod)" :loading="global_load_indicator" />
{{mod.name}}
@@ -30,6 +31,11 @@ export default defineComponent({
async mounted() {
this.$store.commit('loadInstalledMods');
},
+ computed: {
+ installedMods(): NorthstarMod[] {
+ return this.$store.state.installed_mods;
+ }
+ },
methods: {
async updateWhichModsEnabled(mod: NorthstarMod) {
this.global_load_indicator = true;