Skip to content

Commit

Permalink
Hide channel names on the Channel page
Browse files Browse the repository at this point in the history
A la another website, it makes sense to not show the channel name every video  when you are explicitly already perusing that channel's content.
  • Loading branch information
kommunarr committed Aug 26, 2023
1 parent 3bfa370 commit 68001c8
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/renderer/components/ft-element-list/ft-element-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ export default defineComponent({
type: Boolean,
default: false
},
showChannelName: {
type: Boolean,
default: true
},
useChannelsHiddenPreference: {
type: Boolean,
default: true,
default: true
},
},
computed: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:first-screen="index < 16"
:layout="displayValue"
:show-video-with-last-viewed-playlist="showVideoWithLastViewedPlaylist"
:show-channel-name="showChannelName"
:use-channels-hidden-preference="useChannelsHiddenPreference"
/>
</ft-auto-grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export default defineComponent({
type: Boolean,
default: false
},
showChannelName: {
type: Boolean,
default: true,
},
useChannelsHiddenPreference: {
type: Boolean,
default: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
v-if="data.type === 'video' || data.type === 'shortVideo'"
:appearance="appearance"
:data="data"
:show-channel-name="showChannelName"
:show-video-with-last-viewed-playlist="showVideoWithLastViewedPlaylist"
/>
<ft-list-channel
Expand All @@ -28,6 +29,7 @@
v-else-if="data.type === 'playlist'"
:appearance="appearance"
:data="data"
:show-channel-name="showChannelName"
/>
<ft-community-post
v-else-if="data.type === 'community'"
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/components/ft-list-playlist/ft-list-playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export default defineComponent({
appearance: {
type: String,
required: true
},
showChannelName: {
type: Boolean,
default: true,
}
},
data: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{{ title }}
</h3>
</router-link>
<div class="infoLine">
<div class="infoLine" v-if="showChannelName">
<router-link
v-if="channelId"
class="channelName"
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/components/ft-list-video/ft-list-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export default defineComponent({
type: String,
required: true
},
showChannelName: {
type: Boolean,
default: true,
},
showVideoWithLastViewedPlaylist: {
type: Boolean,
default: false
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/ft-list-video/ft-list-video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@
</router-link>
<div class="infoLine">
<router-link
v-if="channelId !== null"
v-if="channelId !== null && showChannelName"
class="channelName"
:to="`/channel/${channelId}`"
>
<span>{{ channelName }}</span>
</router-link>
<template v-if="!isLive && !isUpcoming && !isPremium && !hideViews">
<span class="viewCount"><template v-if="channelId !== null"> •</template> {{ parsedViewCount }} </span>
<span class="viewCount"><template v-if="channelId !== null && showChannelName"> •</template> {{ parsedViewCount }} </span>
<span v-if="viewCount === 1">{{ $t("Video.View").toLowerCase() }}</span>
<span v-else>{{ $t("Video.Views").toLowerCase() }}</span>
</template>
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/views/Channel/Channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@
id="videoPanel"
:data="latestVideos"
:use-channels-hidden-preference="false"
:show-channel-name="false"
role="tabpanel"
aria-labelledby="videosTab"
/>
Expand All @@ -297,6 +298,7 @@
id="shortPanel"
:data="latestShorts"
:use-channels-hidden-preference="false"
:show-channel-name="false"
role="tabpanel"
aria-labelledby="shortsTab"
/>
Expand All @@ -313,6 +315,7 @@
id="livePanel"
:data="latestLive"
:use-channels-hidden-preference="false"
:show-channel-name="false"
role="tabpanel"
aria-labelledby="liveTab"
/>
Expand All @@ -328,6 +331,7 @@
id="podcastPanel"
:data="latestPodcasts"
:use-channels-hidden-preference="false"
:show-channel-name="false"
role="tabpanel"
aria-labelledby="podcastsTab"
/>
Expand All @@ -343,6 +347,7 @@
id="releasePanel"
:data="latestReleases"
:use-channels-hidden-preference="false"
:show-channel-name="false"
role="tabpanel"
aria-labelledby="releasesTab"
/>
Expand All @@ -358,6 +363,7 @@
id="playlistPanel"
:data="latestPlaylists"
:use-channels-hidden-preference="false"
:show-channel-name="false"
role="tabpanel"
aria-labelledby="playlistsTab"
/>
Expand All @@ -373,6 +379,7 @@
id="communityPanel"
:data="latestCommunityPosts"
:use-channels-hidden-preference="false"
:show-channel-name="false"
role="tabpanel"
aria-labelledby="communityTab"
display="list"
Expand All @@ -388,6 +395,7 @@
v-show="currentTab === 'search'"
:data="searchResults"
:use-channels-hidden-preference="false"
:show-channel-name="false"
/>
<ft-flex-box
v-if="currentTab === 'search' && searchResults.length === 0"
Expand Down

0 comments on commit 68001c8

Please sign in to comment.