diff options
author | Rémy Raes <contact@remyraes.com> | 2023-06-08 01:53:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-08 01:53:46 +0200 |
commit | dfbf3aebde6cf024e6b6cd87d58af239cf3d63dc (patch) | |
tree | 2a0007a054b485f21b5a151a966cd15fe3fe8943 /src-vue/src/views/mods | |
parent | 24f6d28b3c2421fd20cd7f3036cdfed98f89e755 (diff) | |
download | FlightCore-dfbf3aebde6cf024e6b6cd87d58af239cf3d63dc.tar.gz FlightCore-dfbf3aebde6cf024e6b6cd87d58af239cf3d63dc.zip |
fix: Don't show deprecated mods (#382)
* fix: don't show deprecated mods
* feat: add setting to settings view
* feat: display deprecated mod cards in red
Diffstat (limited to 'src-vue/src/views/mods')
-rw-r--r-- | src-vue/src/views/mods/ThunderstoreModsView.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src-vue/src/views/mods/ThunderstoreModsView.vue b/src-vue/src/views/mods/ThunderstoreModsView.vue index 58a00367..538a895f 100644 --- a/src-vue/src/views/mods/ThunderstoreModsView.vue +++ b/src-vue/src/views/mods/ThunderstoreModsView.vue @@ -86,13 +86,16 @@ export default defineComponent({ mod.versions[0].description.toLowerCase().includes(this.searchValue)
);
+ // Filter out deprecated mods
+ const showDeprecated = !mod.is_deprecated || this.$store.state.search.showDeprecatedMods;
+
// Filter with categories (only if some categories are selected)
const categoriesMatch: boolean = this.selectedCategories.length === 0
|| mod.categories
.filter((category: string) => this.selectedCategories.includes(category))
.length === this.selectedCategories.length;
- return inputMatches && categoriesMatch;
+ return inputMatches && categoriesMatch && showDeprecated;
});
},
modsList(): ThunderstoreMod[] {
|