Skip to content

Commit

Permalink
Feature: parental control -> hide video and channel info
Browse files Browse the repository at this point in the history
  • Loading branch information
that-one-arab committed Feb 5, 2025
1 parent 6a1b027 commit abec655
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/renderer/components/ParentalControlSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
:default-value="hideCreateNewProfileButton"
@change="updateHideCreateNewProfileButton"
/>
<FtToggleSwitch
:label="$t('Settings.Parental Control Settings.Hide Video & Channel Info')"
compact
:default-value="hideVideoChannelInfo"
@change="updateHideVideoChannelInfo"
/>
</div>
</div>
</FtSettingsSection>
Expand Down Expand Up @@ -69,6 +75,10 @@ const hideAnnouncements = computed(() => {
return store.getters.getHideAnnouncements
})
const hideVideoChannelInfo = computed(() => {
return store.getters.getHideVideoChannelInfo
})
/**
* @param {boolean} value
*/
Expand Down Expand Up @@ -103,4 +113,11 @@ function updateHideCreateNewProfileButton(value) {
function updateHideAnnouncements(value) {
store.dispatch('updateHideAnnouncements', value)
}
/**
* @param {boolean} value
*/
function updateHideVideoChannelInfo(value) {
store.dispatch('updateHideVideoChannelInfo', value)
}
</script>
1 change: 1 addition & 0 deletions src/renderer/store/modules/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ const state = {
showFamilyFriendlyOnly: false,
hideCreateNewProfileButton: false,
hideAnnouncements: false,
hideVideoChannelInfo: false,
hideSharingActions: false,
hideSubscriptionsVideos: false,
hideSubscriptionsShorts: false,
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ export default defineComponent({
hideVideoDescription: function () {
return this.$store.getters.getHideVideoDescription
},
hideVideoChannelInfo: function () {
return this.$store.getters.getHideVideoChannelInfo
},
showFamilyFriendlyOnly: function () {
return this.$store.getters.getShowFamilyFriendlyOnly
},
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/Watch/Watch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
class="ageRestricted"
/>
<div
v-if="(isFamilyFriendly || !showFamilyFriendlyOnly)"
v-if="(!hideVideoChannelInfo && (isFamilyFriendly || !showFamilyFriendlyOnly))"
ref="infoArea"
class="infoArea"
:class="{ infoAreaSticky }"
Expand Down
1 change: 1 addition & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ Settings:
Hide Search Bar: Hide Search Bar
Hide Create New Profile Button: Hide Create New Profile Button
Hide Announcements: Hide Announcements
Hide Video & Channel Info: Hide Video & Channel Info
Download Settings:
Download Settings: Download
Ask Download Path: Ask for download path
Expand Down

0 comments on commit abec655

Please sign in to comment.