aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src/views')
-rw-r--r--src-vue/src/views/SettingsView.vue20
-rw-r--r--src-vue/src/views/mods/ThunderstoreModsView.vue5
2 files changed, 24 insertions, 1 deletions
diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue
index 2f2f5019..c4e94c80 100644
--- a/src-vue/src/views/SettingsView.vue
+++ b/src-vue/src/views/SettingsView.vue
@@ -40,6 +40,18 @@
</el-input>
</div>
+ <div class="fc_parameter__panel">
+ <h3>{{ $t('settings.show_deprecated_mods') }}</h3>
+ <h6>
+ {{ $t('settings.show_deprecated_mods_desc1') }}<br/>
+ {{ $t('settings.show_deprecated_mods_desc2') }}
+ </h6>
+ <span>
+ {{ $t('settings.show_deprecated_mods') }}
+ <el-switch v-model="showDeprecatedMods"></el-switch>
+ </span>
+ </div>
+
<!-- Interface localization -->
<div class="fc_parameter__panel">
<h3>{{ $t('settings.language') }}</h3>
@@ -96,6 +108,14 @@ export default defineComponent({
}
},
computed: {
+ showDeprecatedMods: {
+ get(): boolean {
+ return this.$store.state.search.showDeprecatedMods;
+ },
+ set(value: boolean) {
+ this.$store.state.search.showDeprecatedMods = value;
+ }
+ },
flightcoreVersion(): string {
return this.$store.state.flightcore_version;
},
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[] {