Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/renderer/views/Channel/Channel.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: baseline;
gap: 10px;
margin-block-end: 10px;
}

Expand Down
25 changes: 25 additions & 0 deletions src/renderer/views/Channel/Channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
:related-channels="relatedChannels"
/>
<div class="select-container">
<FtButton
v-if="showViewAllButton"
style="margin-top: 33px;"
:label="$t('Channel.View All')"
@click="router.push(currentTabViewAllRoute)"
/>
<FtSelect
v-if="showVideoSortBy"
v-show="currentTab === 'videos' && (showFetchMoreButton || filteredVideos.length > 1)"
Expand Down Expand Up @@ -280,6 +286,7 @@ import FtElementList from '../../components/FtElementList/FtElementList.vue'
import FtFlexBox from '../../components/ft-flex-box/ft-flex-box.vue'
import FtLoader from '../../components/FtLoader/FtLoader.vue'
import FtSelect from '../../components/FtSelect/FtSelect.vue'
import FtButton from '../../components/FtButton/FtButton.vue'

import store from '../../store/index'

Expand Down Expand Up @@ -510,6 +517,24 @@ const tabInfoValues = computed(() => {
return values
})

const showViewAllButton = computed(() => {
switch (currentTab.value) {
case 'videos': return (videoSortBy.value === 'newest' || videoSortBy.value === 'popular') && (showFetchMoreButton.value || filteredVideos.value.length > 1)
case 'shorts': return (shortSortBy.value === 'newest' || shortSortBy.value === 'popular') && (showFetchMoreButton.value || filteredShorts.value.length > 1)
case 'live': return (liveSortBy.value === 'newest' || liveSortBy.value === 'popular') && (showFetchMoreButton.value || filteredLive.value.length > 1)
default: return false
}
})

const currentTabViewAllRoute = computed(() => {
switch (currentTab.value) {
case 'videos': return `/playlist/${getChannelPlaylistId(id.value, 'videos', videoSortBy.value)}`
case 'shorts': return `/playlist/${getChannelPlaylistId(id.value, 'shorts', shortSortBy.value)}`
case 'live': return `/playlist/${getChannelPlaylistId(id.value, 'live', liveSortBy.value)}`
default: return ''
}
})

watch(route, () => {
if (skipRouteChangeWatcherOnce) {
skipRouteChangeWatcherOnce = false
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 @@ -775,6 +775,7 @@ Channel:
This channel does not allow searching: This channel does not allow searching
This channel is age-restricted and currently cannot be viewed in FreeTube.: This channel is age-restricted and currently cannot be viewed in FreeTube.
Channel Tabs: Channel Tabs
View All: View All
Videos:
Videos: Videos
This channel does not currently have any videos: This channel does not currently
Expand Down
Loading