From 6a877fd353fe454f6770e72433b054f1246a2967 Mon Sep 17 00:00:00 2001 From: Milo Ivir Date: Wed, 31 Jan 2024 11:38:24 +0000 Subject: [PATCH 1/6] Translated using Weblate (Croatian) Currently translated at 100.0% (814 of 814 strings) Translation: FreeTube/Translations Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/hr/ --- static/locales/hr.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/locales/hr.yaml b/static/locales/hr.yaml index e9dbfe204615e..a57585b8ac84d 100644 --- a/static/locales/hr.yaml +++ b/static/locales/hr.yaml @@ -548,6 +548,7 @@ Settings: provjeri točnost ID-a. Hide Videos and Playlists Containing Text Placeholder: Riječ, fragment riječi ili fraza + Hide Videos and Playlists Containing Text: Sakrij videa i zbirke koji sadrže tekst The app needs to restart for changes to take effect. Restart and apply change?: Promjene će se primijeniti nakon ponovnog pokeretanja programa. Ponovo pokrenuti program? Proxy Settings: @@ -1117,6 +1118,10 @@ Tooltips: se mora potpuno poklapati i razlikuje velika i mala slova. Hide Subscriptions Live: Ovu postavku nadjačava aplikacijska postavka „{appWideSetting}”, u odjeljku „{subsection}” u „{settingsSection}” + Hide Videos and Playlists Containing Text: Upiši riječ, fragment riječi ili izraz + (ne razlikuje velika i mala slova) za skrivanje svih videa i zbirki s tim sadržajem + u njihovim izvornim naslovima u cijelom FreeTubeu, isključujući samo povijest, + tvoje zbirke i videa unutar zbirki. SponsorBlock Settings: UseDeArrowTitles: Zamijeni naslove videa koje su poslali korisnici s DeArrow naslovima. UseDeArrowThumbnails: Zamijeni minijature videa s DeArrow minijaturama. From cec2d3647f93e58808713544501240bba5fe0c75 Mon Sep 17 00:00:00 2001 From: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> Date: Wed, 31 Jan 2024 09:54:25 -0500 Subject: [PATCH 2/6] Properly localize playlist view and video counts (#4620) --- src/renderer/components/playlist-info/playlist-info.js | 9 +++++++++ src/renderer/components/playlist-info/playlist-info.vue | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/playlist-info/playlist-info.js b/src/renderer/components/playlist-info/playlist-info.js index f5c43941322d5..32f8efa575d02 100644 --- a/src/renderer/components/playlist-info/playlist-info.js +++ b/src/renderer/components/playlist-info/playlist-info.js @@ -6,6 +6,7 @@ import FtIconButton from '../ft-icon-button/ft-icon-button.vue' import FtInput from '../ft-input/ft-input.vue' import FtPrompt from '../ft-prompt/ft-prompt.vue' import { + formatNumber, showToast, } from '../../helpers/utils' @@ -145,6 +146,14 @@ export default defineComponent({ return this.firstVideoId !== '' }, + parsedViewCount() { + return formatNumber(this.viewCount) + }, + + parsedVideoCount() { + return formatNumber(this.videoCount) + }, + thumbnail: function () { if (this.thumbnailPreference === 'hidden' || !this.firstVideoIdExists) { return require('../../assets/img/thumbnail_placeholder.svg') diff --git a/src/renderer/components/playlist-info/playlist-info.vue b/src/renderer/components/playlist-info/playlist-info.vue index 4dd1f1e95bb01..d5af7424e0b15 100644 --- a/src/renderer/components/playlist-info/playlist-info.vue +++ b/src/renderer/components/playlist-info/playlist-info.vue @@ -47,9 +47,9 @@ {{ title }}

- {{ videoCount }} {{ $t("Playlist.Videos") }} + {{ $tc('Global.Counts.Video Count', videoCount, {count: parsedVideoCount}) }} - - {{ viewCount }} {{ $t("Playlist.Views") }} + - {{ $tc('Global.Counts.View Count', viewCount, {count: parsedViewCount}) }} - From 5a6d4d50386be2aa1368b28ddb70dbb1abc70ef5 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Thu, 1 Feb 2024 00:16:29 +0800 Subject: [PATCH 3/6] ! Fix playlist type not passed when playing next/prev item in a user playlist (#4623) --- .../components/watch-video-playlist/watch-video-playlist.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/watch-video-playlist/watch-video-playlist.js b/src/renderer/components/watch-video-playlist/watch-video-playlist.js index 5e74cb10ea55f..a68df182ec136 100644 --- a/src/renderer/components/watch-video-playlist/watch-video-playlist.js +++ b/src/renderer/components/watch-video-playlist/watch-video-playlist.js @@ -302,7 +302,8 @@ export default defineComponent({ playNextVideo: function () { const playlistInfo = { - playlistId: this.playlistId + playlistId: this.playlistId, + playlistType: this.playlistType, } const videoIndex = this.videoIndexInPlaylistItems @@ -349,7 +350,8 @@ export default defineComponent({ showToast(this.$t('Playing Previous Video')) const playlistInfo = { - playlistId: this.playlistId + playlistId: this.playlistId, + playlistType: this.playlistType, } const videoIndex = this.videoIndexInPlaylistItems From 351fdb951de00ee5348dd74749bac6c258afc878 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Thu, 1 Feb 2024 13:08:47 +0100 Subject: [PATCH 4/6] Playlist performance improvements (#4597) * Implement pagination for user playlists on the Playlist page * Fix the load more loading icon being displayed off-screen * Caching user playlists is unnecessary as they are already in the store * ft-list-video: Only render description element if there is a description * Minor speed ups in the playlists store * ft-list-video: Remove superfluous template around view count * ft-list-video: Replace watched property with historyEntryExists computed property * playlist-info: Fix copying partially loaded user playlists * Fix the playlist number not getting lazy loaded * Reduce nesting levels Co-authored-by: PikachuEXE --------- Co-authored-by: PikachuEXE --- .../ft-list-video-numbered.css | 17 +++ .../ft-list-video-numbered.js | 124 ++++++++++++++++++ .../ft-list-video-numbered.vue | 53 ++++++++ .../components/ft-list-video/ft-list-video.js | 15 +-- .../ft-list-video/ft-list-video.vue | 17 +-- .../components/playlist-info/playlist-info.js | 2 +- .../watch-video-playlist.css | 13 -- .../watch-video-playlist.js | 9 +- .../watch-video-playlist.vue | 46 +++---- src/renderer/store/modules/playlists.js | 27 ++-- src/renderer/views/Playlist/Playlist.js | 45 ++++++- src/renderer/views/Playlist/Playlist.scss | 5 - src/renderer/views/Playlist/Playlist.vue | 50 +++---- 13 files changed, 306 insertions(+), 117 deletions(-) create mode 100644 src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.css create mode 100644 src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.js create mode 100644 src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.vue diff --git a/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.css b/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.css new file mode 100644 index 0000000000000..20e216423f167 --- /dev/null +++ b/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.css @@ -0,0 +1,17 @@ +/* + Set a height to invisible/unloaded elements, so that lazy loading actually works. + If we don't set a height, they all get a height of 0px (because they have no content), + so they all bunch up together and end up loading all of them in one go. + */ +.placeholder { + block-size: 40px; +} + +.videoIndex { + color: var(--tertiary-text-color); + text-align: center; +} + +.videoIndexIcon { + font-size: 14px; +} diff --git a/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.js b/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.js new file mode 100644 index 0000000000000..9ed32bb8e9a89 --- /dev/null +++ b/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.js @@ -0,0 +1,124 @@ +import { defineComponent } from 'vue' +import FtListVideo from '../ft-list-video/ft-list-video.vue' + +export default defineComponent({ + name: 'FtListVideoNumbered', + components: { + 'ft-list-video': FtListVideo + }, + props: { + data: { + type: Object, + required: true + }, + playlistId: { + type: String, + default: null + }, + playlistType: { + type: String, + default: null + }, + playlistIndex: { + type: Number, + default: null + }, + playlistReverse: { + type: Boolean, + default: false + }, + playlistShuffle: { + type: Boolean, + default: false + }, + playlistLoop: { + type: Boolean, + default: false + }, + playlistItemId: { + type: String, + default: null, + }, + appearance: { + type: String, + required: true + }, + initialVisibleState: { + type: Boolean, + default: false, + }, + alwaysShowAddToPlaylistButton: { + type: Boolean, + default: false, + }, + quickBookmarkButtonEnabled: { + type: Boolean, + default: true, + }, + canMoveVideoUp: { + type: Boolean, + default: false, + }, + canMoveVideoDown: { + type: Boolean, + default: false, + }, + canRemoveFromPlaylist: { + type: Boolean, + default: false, + }, + videoIndex: { + type: Number, + default: -1 + }, + isCurrentVideo: { + type: Boolean, + default: false + }, + useChannelsHiddenPreference: { + type: Boolean, + default: false, + } + }, + data: function () { + return { + visible: false, + show: true + } + }, + computed: { + channelsHidden() { + // Some component users like channel view will have this disabled + if (!this.useChannelsHiddenPreference) { return [] } + + return JSON.parse(this.$store.getters.getChannelsHidden).map((ch) => { + // Legacy support + if (typeof ch === 'string') { + return { name: ch, preferredName: '', icon: '' } + } + return ch + }) + }, + + // As we only use this component in Playlist and watch-video-playlist, + // where title filtering is never desired, we don't have any title filtering logic here, + // like we do in ft-list-video-lazy + + shouldBeVisible() { + return !(this.channelsHidden.some(ch => ch.name === this.data.authorId) || + this.channelsHidden.some(ch => ch.name === this.data.author)) + } + }, + created() { + this.visible = this.initialVisibleState + }, + methods: { + onVisibilityChanged: function (visible) { + if (visible && this.shouldBeVisible) { + this.visible = visible + } else if (visible) { + this.show = false + } + } + } +}) diff --git a/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.vue b/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.vue new file mode 100644 index 0000000000000..745a704fe84c5 --- /dev/null +++ b/src/renderer/components/ft-list-video-numbered/ft-list-video-numbered.vue @@ -0,0 +1,53 @@ + + +