Skip to content
Merged
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
21 changes: 5 additions & 16 deletions src/renderer/views/Channel/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,11 @@ export default defineComponent({
errorMessage: '',
showSearchBar: true,
showShareMenu: true,
videoLiveSelectValues: [
videoLiveShortSelectValues: [
'newest',
'popular',
'oldest'
],
shortSelectValues: [
'newest',
'popular'
],
playlistSelectValues: [
'newest',
'last'
Expand Down Expand Up @@ -184,21 +180,14 @@ export default defineComponent({
return profileList[0].subscriptions.some((channel) => channel.id === this.id)
},

videoLiveSelectNames: function () {
videoLiveShortSelectNames: function () {
return [
this.$t('Channel.Videos.Sort Types.Newest'),
this.$t('Channel.Videos.Sort Types.Most Popular'),
this.$t('Channel.Videos.Sort Types.Oldest')
]
},

shortSelectNames: function () {
return [
this.$t('Channel.Videos.Sort Types.Newest'),
this.$t('Channel.Videos.Sort Types.Most Popular')
]
},

playlistSelectNames: function () {
return [
this.$t('Channel.Playlists.Sort Types.Newest'),
Expand Down Expand Up @@ -769,7 +758,7 @@ export default defineComponent({
this.showVideoSortBy = videosTab.filters.length > 1

if (this.showVideoSortBy && this.videoSortBy !== 'newest') {
const index = this.videoLiveSelectValues.indexOf(this.videoSortBy)
const index = this.videoLiveShortSelectValues.indexOf(this.videoSortBy)
videosTab = await videosTab.applyFilter(videosTab.filters[index])
}

Expand Down Expand Up @@ -837,7 +826,7 @@ export default defineComponent({
this.showShortSortBy = shortsTab.filters.length > 1

if (this.showShortSortBy && this.shortSortBy !== 'newest') {
const index = this.shortSelectValues.indexOf(this.shortSortBy)
const index = this.videoLiveShortSelectValues.indexOf(this.shortSortBy)
shortsTab = await shortsTab.applyFilter(shortsTab.filters[index])
}

Expand Down Expand Up @@ -905,7 +894,7 @@ export default defineComponent({
this.showLiveSortBy = liveTab.filters.length > 1

if (this.showLiveSortBy && this.liveSortBy !== 'newest') {
const index = this.videoLiveSelectValues.indexOf(this.liveSortBy)
const index = this.videoLiveShortSelectValues.indexOf(this.liveSortBy)
liveTab = await liveTab.applyFilter(liveTab.filters[index])
}

Expand Down
18 changes: 9 additions & 9 deletions src/renderer/views/Channel/Channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,27 +233,27 @@
<ft-select
v-if="showVideoSortBy"
v-show="currentTab === 'videos' && latestVideos.length > 0"
:value="videoLiveSelectValues[0]"
:select-names="videoLiveSelectNames"
:select-values="videoLiveSelectValues"
:value="videoLiveShortSelectValues[0]"
:select-names="videoLiveShortSelectNames"
:select-values="videoLiveShortSelectValues"
:placeholder="$t('Search Filters.Sort By.Sort By')"
@change="videoSortBy = $event"
/>
<ft-select
v-if="!hideChannelShorts && showShortSortBy"
v-show="currentTab === 'shorts' && latestShorts.length > 0"
:value="shortSelectValues[0]"
:select-names="shortSelectNames"
:select-values="shortSelectValues"
:value="videoLiveShortSelectValues[0]"
:select-names="videoLiveShortSelectNames"
:select-values="videoLiveShortSelectValues"
:placeholder="$t('Search Filters.Sort By.Sort By')"
@change="shortSortBy = $event"
/>
<ft-select
v-if="!hideLiveStreams && showLiveSortBy"
v-show="currentTab === 'live' && latestLive.length > 0"
:value="videoLiveSelectValues[0]"
:select-names="videoLiveSelectNames"
:select-values="videoLiveSelectValues"
:value="videoLiveShortSelectValues[0]"
:select-names="videoLiveShortSelectNames"
:select-values="videoLiveShortSelectValues"
:placeholder="$t('Search Filters.Sort By.Sort By')"
@change="liveSortBy = $event"
/>
Expand Down