From 8ae6980f59d22a4f03556b362a9ab8845cfe3592 Mon Sep 17 00:00:00 2001
From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
Date: Thu, 4 Jul 2024 20:02:57 +0200
Subject: feat: Filter NSFW mods by default (#964)

Add an option to filter out NSFW mods from Thunderstore and filter them out by default.
---
 src-vue/src/views/SettingsView.vue | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

(limited to 'src-vue/src/views/SettingsView.vue')

diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue
index 16b894d5..5ead665b 100644
--- a/src-vue/src/views/SettingsView.vue
+++ b/src-vue/src/views/SettingsView.vue
@@ -112,6 +112,14 @@
                     </el-button>
                 </div>
 
+                <div class="fc_parameter__panel">
+                    <h3>{{ $t('settings.show_nsfw_mods') }}</h3>
+                    <span>
+                        {{ $t('settings.show_nsfw_mods') }}
+                        <el-switch v-model="showNsfwMods"></el-switch>
+                    </span>
+                </div>
+
                 <!-- About section -->
                 <div class="fc_parameter__panel">
                     <h3>{{ $t('settings.about') }}</h3>
@@ -157,6 +165,14 @@ export default defineComponent({
         }
     },
     computed: {
+        showNsfwMods: {
+            get(): boolean {
+                return this.$store.state.search.showNsfwMods;
+            },
+            set(value: boolean) {
+                this.$store.state.search.showNsfwMods = value;
+            }
+        },
         showDeprecatedMods: {
             get(): boolean {
                 return this.$store.state.search.showDeprecatedMods;
-- 
cgit v1.2.3

