From 2351ee9cbaf837cc97ad9204102da70f738fa442 Mon Sep 17 00:00:00 2001 From: Jie Li Date: Tue, 12 Nov 2024 23:31:21 +0000 Subject: [PATCH 1/4] added buttons to hide hidden content --- .../distraction-settings.js | 8 +++++++ .../distraction-settings.vue | 21 +++++++++++++++++++ .../components/ft-input-tags/ft-input-tags.js | 4 ++++ .../ft-input-tags/ft-input-tags.vue | 5 ++++- src/renderer/store/modules/settings.js | 2 ++ static/locales/en-US.yaml | 3 +++ 6 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/distraction-settings/distraction-settings.js b/src/renderer/components/distraction-settings/distraction-settings.js index cdb0f4f01..005054b64 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.js +++ b/src/renderer/components/distraction-settings/distraction-settings.js @@ -111,6 +111,12 @@ export default defineComponent({ showDistractionFreeTitles: function () { return this.$store.getters.getShowDistractionFreeTitles }, + showHiddenChannels: function () { + return this.$store.getters.getShowHiddenChannels + }, + showHiddenText: function () { + return this.$store.getters.getShowHiddenText + }, channelsHidden: function () { return JSON.parse(this.$store.getters.getChannelsHidden).map((ch) => { // Legacy support @@ -224,6 +230,8 @@ export default defineComponent({ 'updateHideSubscriptionsShorts', 'updateHideSubscriptionsLive', 'updateHideSubscriptionsCommunity', + 'updateShowHiddenChannels', + 'updateShowHiddenText' ]) } }) diff --git a/src/renderer/components/distraction-settings/distraction-settings.vue b/src/renderer/components/distraction-settings/distraction-settings.vue index 40fc7a6e7..87d8000b8 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.vue +++ b/src/renderer/components/distraction-settings/distraction-settings.vue @@ -228,6 +228,25 @@
+

+ {{ $t('Settings.Distraction Free Settings.Sections.Content Filter') }} +

+
+ + +
diff --git a/src/renderer/components/ft-input-tags/ft-input-tags.js b/src/renderer/components/ft-input-tags/ft-input-tags.js index 281b35171..3b4d97980 100644 --- a/src/renderer/components/ft-input-tags/ft-input-tags.js +++ b/src/renderer/components/ft-input-tags/ft-input-tags.js @@ -28,6 +28,10 @@ export default defineComponent({ type: String, required: true }, + showHiddenContent: { + type: String, + required: true + }, minInputLength: { type: Number, default: 1 diff --git a/src/renderer/components/ft-input-tags/ft-input-tags.vue b/src/renderer/components/ft-input-tags/ft-input-tags.vue index 4c387589e..a8b2f4ebc 100644 --- a/src/renderer/components/ft-input-tags/ft-input-tags.vue +++ b/src/renderer/components/ft-input-tags/ft-input-tags.vue @@ -21,7 +21,10 @@ :force-action-button-icon-name="['fas', 'arrow-right']" @click="updateTags" /> -
+