added buttons to hide hidden content

This commit is contained in:
Jie Li 2024-11-12 23:31:21 +00:00
parent a5f6ebc283
commit 2351ee9cba
6 changed files with 42 additions and 1 deletions

View File

@ -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'
])
}
})

View File

@ -228,6 +228,25 @@
</div>
</div>
<br class="hide-on-mobile">
<h4
class="groupTitle"
>
{{ $t('Settings.Distraction Free Settings.Sections.Content Filter') }}
</h4>
<div class="switchColumnGrid">
<ft-toggle-switch
:label="$t('Settings.Distraction Free Settings.Show hidden channels')"
:compact="true"
:default-value="showHiddenChannels"
@change="updateShowHiddenChannels"
/>
<ft-toggle-switch
:label="$t('Settings.Distraction Free Settings.Show hidden text')"
:compact="true"
:default-value="showHiddenText"
@change="updateShowHiddenText"
/>
</div>
<ft-flex-box>
<ft-input-tags
:disabled="channelHiderDisabled"
@ -240,6 +259,7 @@
:validate-tag-name="validateChannelId"
:find-tag-info="findChannelTagInfo"
:are-channel-tags="true"
:show-hidden-content="showHiddenChannels"
@invalid-name="handleInvalidChannel"
@error-find-tag-info="handleChannelAPIError"
@change="handleChannelsHidden"
@ -254,6 +274,7 @@
:tag-list="forbiddenTitles"
:min-input-length="3"
:tooltip="$t('Tooltips.Distraction Free Settings.Hide Videos and Playlists Containing Text')"
:show-hidden-content="showHiddenText"
@change="handleForbiddenTitles"
/>
</ft-flex-box>

View File

@ -28,6 +28,10 @@ export default defineComponent({
type: String,
required: true
},
showHiddenContent: {
type: String,
required: true
},
minInputLength: {
type: Number,
default: 1

View File

@ -21,7 +21,10 @@
:force-action-button-icon-name="['fas', 'arrow-right']"
@click="updateTags"
/>
<div class="ft-tag-box">
<div
v-if="showHiddenContent"
class="ft-tag-box"
>
<ul>
<li
v-for="tag in tagList"

View File

@ -296,6 +296,8 @@ const state = {
screenshotFolderPath: '',
screenshotFilenamePattern: '%Y%M%D-%H%N%S',
settingsSectionSortEnabled: false,
showHiddenChannels: true,
showHiddenText: true,
fetchSubscriptionsAutomatically: true,
settingsPassword: '',
useDeArrowTitles: false,

View File

@ -484,6 +484,7 @@ Settings:
Channel Page: Channel Page
Watch Page: Watch Page
General: General
Content Filter: Content Filter
Hide Video Views: Hide Video Views
Hide Video Likes And Dislikes: Hide Video Likes And Dislikes
Hide Channel Subscribers: Hide Channel Subscribers
@ -520,6 +521,8 @@ Settings:
Hide Subscriptions Shorts: Hide Subscriptions Shorts
Hide Subscriptions Live: Hide Subscriptions Live
Hide Subscriptions Community: Hide Subscriptions Community
Show hidden channels: Show hidden channels
Show hidden text: Show hidden text
Data Settings:
Data Settings: Data
Select Import Type: Select Import Type