Skip to content

Commit

Permalink
Merge branch 'development' into custom-builds/current
Browse files Browse the repository at this point in the history
* development:
  Update icons for add to/remove from quick bookmark button (FreeTubeApp#4825)
  Add support for sorting the shorts tab by oldest on the local API (FreeTubeApp#4832)
  • Loading branch information
PikachuEXE committed Apr 2, 2024
2 parents 5419123 + 4dea774 commit 3eace65
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/renderer/components/ft-list-video/ft-list-video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<ft-icon-button
v-if="isQuickBookmarkEnabled && quickBookmarkButtonEnabled"
:title="quickBookmarkIconText"
:icon="['fas', 'star']"
:icon="isInQuickBookmarkPlaylist ? ['fas', 'check'] : ['fas', 'clock']"
class="quickBookmarkVideoIcon"
:class="{
bookmarked: isInQuickBookmarkPlaylist,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<ft-icon-button
v-if="isQuickBookmarkEnabled"
:title="quickBookmarkIconText"
:icon="['fas', 'star']"
:icon="isInQuickBookmarkPlaylist ? ['fas', 'check'] : ['fas', 'clock']"
class="quickBookmarkVideoIcon"
:class="{
bookmarked: isInQuickBookmarkPlaylist,
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
faCheck,
faChevronRight,
faCircleUser,
faClock,
faClone,
faComment,
faCommentDots,
Expand Down Expand Up @@ -63,7 +64,6 @@ import {
faShareAlt,
faSlidersH,
faSortDown,
faStar,
faStepBackward,
faStepForward,
faSync,
Expand Down Expand Up @@ -102,6 +102,7 @@ library.add(
faCheck,
faChevronRight,
faCircleUser,
faClock,
faClone,
faComment,
faCommentDots,
Expand Down Expand Up @@ -143,7 +144,6 @@ library.add(
faShareAlt,
faSlidersH,
faSortDown,
faStar,
faStepBackward,
faStepForward,
faSync,
Expand Down
14 changes: 7 additions & 7 deletions src/renderer/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
--primary-shadow-color: rgba(232, 232, 232, 1);
--title-color: #3f7ac6;
--bg-color: #f1f1f1;
--favorite-icon-color: #FFD600;
--favorite-icon-color: #00CC00;
--card-bg-color: #FFFFFF;
--secondary-card-bg-color: #eeeeee;
--scrollbar-color: #CCCCCC;
Expand All @@ -89,7 +89,7 @@
--tertiary-text-color: #999;
--title-color: #EEEEEE;
--bg-color: #212121;
--favorite-icon-color: #FFEA00;
--favorite-icon-color: #00FF00;
--card-bg-color: #303030;
--secondary-card-bg-color: rgba(0, 0, 0, 0.75);
--scrollbar-color: #414141;
Expand All @@ -106,7 +106,7 @@
--tertiary-text-color: #EEEEEE;
--title-color: #EEEEEE;
--bg-color: #000000;
--favorite-icon-color: #FFEA00;
--favorite-icon-color: #00FF00;
--card-bg-color: #000000;
--secondary-card-bg-color: rgba(0, 0, 0, 0.75);
--scrollbar-color: #515151;
Expand Down Expand Up @@ -137,7 +137,7 @@
--tertiary-text-color: #e5e8f3;
--title-color: #BD93F9;
--bg-color: #282A36;
--favorite-icon-color: #F1FA8C;
--favorite-icon-color: #00FF00;
--card-bg-color: #33353F;
--secondary-card-bg-color: #282A36;
--scrollbar-color: #44475A;
Expand All @@ -156,7 +156,7 @@
--tertiary-text-color: #a6adc8;
--title-color: var(--accent-color);
--bg-color: #1e1e2e;
--favorite-icon-color: #f9e2af;
--favorite-icon-color: #00FF00;
--card-bg-color: #181825;
--secondary-card-bg-color: #1e1e2e;
--scrollbar-color: #313244;
Expand Down Expand Up @@ -197,7 +197,7 @@
--tertiary-text-color: #FFFF;
--title-color: #000000;
--bg-color: #ff008a;
--favorite-icon-color: #FFEA00;
--favorite-icon-color: #00FF00;
--card-bg-color: #DE1C85;
--secondary-card-bg-color: rgba(0, 0, 0, 0.75);
--scrollbar-color: #FFFFFF;
Expand Down Expand Up @@ -248,7 +248,7 @@ it can be safely elided. This looks quite pleasant on this theme. */
--tertiary-text-color: #EEEEEE;
--title-color: #EEEEEE;
--bg-color: #2b2f3a;
--favorite-icon-color: #FFEA00;
--favorite-icon-color: #00FF00;
--card-bg-color: #2e3440;
--secondary-card-bg-color: rgba(59, 66, 82, 0.75);
--scrollbar-color: #4b566a;
Expand Down
21 changes: 5 additions & 16 deletions src/renderer/views/Channel/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,11 @@ export default defineComponent({
errorMessage: '',
showSearchBar: true,
showShareMenu: true,
videoLiveSelectValues: [
videoLiveShortSelectValues: [
'newest',
'popular',
'oldest'
],
shortSelectValues: [
'newest',
'popular'
],
playlistSelectValues: [
'newest',
'last'
Expand Down Expand Up @@ -186,21 +182,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 @@ -771,7 +760,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 @@ -839,7 +828,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 @@ -907,7 +896,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

0 comments on commit 3eace65

Please sign in to comment.