-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add Parental Control toggle to disable channel link from videos #8502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
1c731e4
0497ad0
a7f0b0a
f1d3080
b139c94
74470c8
acbb5c7
c15d699
6ddba7a
95d9e9b
de2b341
50f7921
a90601d
5781438
b961704
c46623f
7034efc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |||||
| > | ||||||
| <div class="channelThumbnail"> | ||||||
| <router-link | ||||||
| v-if="enableChannelLinks" | ||||||
| :to="`/channel/${id}`" | ||||||
| class="channelThumbnailLink" | ||||||
| tabindex="-1" | ||||||
|
|
@@ -20,10 +21,21 @@ | |||||
| alt="" | ||||||
| > | ||||||
| </router-link> | ||||||
| <div | ||||||
| v-if="!enableChannelLinks" | ||||||
| class="channelThumbnailLink" | ||||||
| > | ||||||
| <img | ||||||
| :src="thumbnail" | ||||||
| :class="!isGame ? 'channelImage' : 'gameImage'" | ||||||
| alt="" | ||||||
| > | ||||||
| </div> | ||||||
| </div> | ||||||
| <div class="infoAndSubscribe"> | ||||||
| <div class="info"> | ||||||
| <router-link | ||||||
| v-if="enableChannelLinks" | ||||||
| class="title" | ||||||
| :to="`/channel/${id}`" | ||||||
| > | ||||||
|
|
@@ -34,15 +46,29 @@ | |||||
| {{ name }} | ||||||
| </h3> | ||||||
| </router-link> | ||||||
| <div | ||||||
| v-if="!enableChannelLinks" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| class="title" | ||||||
| > | ||||||
| <h3 class="h3Title"> | ||||||
| {{ name }} | ||||||
| </h3> | ||||||
| </div> | ||||||
| <div class="infoLine"> | ||||||
| <router-link | ||||||
| v-if="handle !== null" | ||||||
| v-if="handle !== null && enableChannelLinks" | ||||||
| class="handle" | ||||||
| dir="auto" | ||||||
| :to="`/channel/${id}`" | ||||||
| > | ||||||
| {{ handle }} | ||||||
| </router-link> | ||||||
| <bdi | ||||||
| v-if="handle !== null && !enableChannelLinks" | ||||||
| class="handle" | ||||||
| > | ||||||
| {{ handle }} | ||||||
| </bdi> | ||||||
|
Comment on lines
58
to
+71
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would probably be better to wrap both of these tags in a |
||||||
| <span | ||||||
| v-if="subscriberCount !== null && !hideChannelSubscriptions" | ||||||
| class="subscriberCount" | ||||||
|
|
@@ -118,6 +144,8 @@ const hideUnsubscribeButton = computed(() => { | |||||
| return store.getters.getHideUnsubscribeButton | ||||||
| }) | ||||||
|
|
||||||
| const enableChannelLinks = computed(() => !store.getters.getDisableChannelLinks) | ||||||
|
|
||||||
| let id = '' | ||||||
| let thumbnail = '' | ||||||
| let name = '' | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -109,7 +109,7 @@ | |||||||||||
| class="channelShareWrapper" | ||||||||||||
| > | ||||||||||||
| <router-link | ||||||||||||
| v-if="!isUserPlaylist && channelId" | ||||||||||||
| v-if="!isUserPlaylist && channelId && enableChannelLinks" | ||||||||||||
| class="playlistChannel" | ||||||||||||
| :to="`/channel/${channelId}`" | ||||||||||||
| > | ||||||||||||
|
|
@@ -129,6 +129,11 @@ | |||||||||||
| v-else | ||||||||||||
| class="playlistChannel" | ||||||||||||
| > | ||||||||||||
| <img | ||||||||||||
| class="channelThumbnail" | ||||||||||||
|
Comment on lines
+132
to
+133
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The channel thumbnail wasn't here before, because when YouTube doesn't return a channel link here it also doesn't return a thumbnail, so you need to wrap the channel thumbnail in a if statement.
Suggested change
|
||||||||||||
| :src="channelThumbnail" | ||||||||||||
| alt="" | ||||||||||||
| > | ||||||||||||
| <h3 | ||||||||||||
| class="channelName" | ||||||||||||
| dir="auto" | ||||||||||||
|
|
@@ -957,6 +962,8 @@ onMounted(() => { | |||||||||||
| onBeforeUnmount(() => { | ||||||||||||
| document.removeEventListener('keydown', keyboardShortcutHandler) | ||||||||||||
| }) | ||||||||||||
|
|
||||||||||||
| const enableChannelLinks = computed(() => !store.getters.getDisableChannelLinks) | ||||||||||||
| </script> | ||||||||||||
|
|
||||||||||||
| <style scoped lang="scss" src="./PlaylistInfo.scss" /> | ||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -42,6 +42,7 @@ | |||||
| v-if="!hideUploader" | ||||||
| > | ||||||
| <RouterLink | ||||||
| v-if="enableChannelLinks" | ||||||
| :to="`/channel/${channelId}`" | ||||||
| > | ||||||
| <img | ||||||
|
|
@@ -50,18 +51,31 @@ | |||||
| alt="" | ||||||
| > | ||||||
| </RouterLink> | ||||||
| <img | ||||||
| v-if="!enableChannelLinks" | ||||||
| :src="channelThumbnail" | ||||||
| class="channelThumbnail initialCursor" | ||||||
| alt="" | ||||||
| > | ||||||
| </div> | ||||||
| <div> | ||||||
| <div | ||||||
| v-if="!hideUploader" | ||||||
| > | ||||||
| <RouterLink | ||||||
| v-if="enableChannelLinks" | ||||||
| :to="`/channel/${channelId}`" | ||||||
| class="channelName" | ||||||
| dir="auto" | ||||||
| > | ||||||
| {{ channelName }} | ||||||
| </RouterLink> | ||||||
| <div | ||||||
| v-if="!enableChannelLinks" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| class="channelName initialCursor" | ||||||
| > | ||||||
| {{ channelName }} | ||||||
| </div> | ||||||
| </div> | ||||||
| <FtSubscribeButton | ||||||
| v-if="!hideUnsubscribeButton" | ||||||
|
|
@@ -503,6 +517,8 @@ function removeFromQuickBookmarkPlaylist() { | |||||
| // TODO: Maybe show playlist name | ||||||
| showToast(t('Video.Video has been removed from your saved list')) | ||||||
| } | ||||||
|
|
||||||
| const enableChannelLinks = computed(() => !store.getters.getDisableChannelLinks) | ||||||
| </script> | ||||||
|
|
||||||
| <style scoped src="./WatchVideoInfo.css" /> | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -671,6 +671,14 @@ Settings: | |
| Hide Uploader on Watch page: Hide Uploader on Watch page | ||
| Show Family Friendly Only: Show Family Friendly Only | ||
| Hide Search Bar: Hide Search Bar | ||
| Disable Channel Links: Disable Channel Links | ||
| Download Settings: | ||
| Download Settings: Download | ||
| Ask Download Path: Ask for download path | ||
| Choose Path: Choose Path | ||
| Download Behavior: Download Behavior | ||
| Download in app: Download in app | ||
| Open in web browser: Open in web browser | ||
|
Comment on lines
+675
to
+681
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am gonna guess this is from merging dev...?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I believe so
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if this came from a merge, the fact that it is still here means the merge wasn't clean and as those download strings no longer exist on the development branch, merging this pull request as is would add those strings back. |
||
| Experimental Settings: | ||
| Experimental Settings: Experimental | ||
| Warning: These settings are experimental, they may cause crashes while enabled. Making backups is highly recommended. Use at your own risk! | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.