From 07a63279033a415918367bac1f9b9b957015a8eb Mon Sep 17 00:00:00 2001 From: preston Date: Sat, 26 Jun 2021 15:10:48 -0400 Subject: [PATCH 001/105] Bump version number to v0.13.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f5983d6f35ffc..4e45613689bba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "freetube", - "version": "0.13.1", + "version": "0.13.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0f93b899622f8..f70bf3cfba639 100644 --- a/package.json +++ b/package.json @@ -148,5 +148,5 @@ "test": "run-s rebuild:node pack:workers jest", "test:watch": "run-s rebuild:node pack:workers jest:watch" }, - "version": "0.13.1" + "version": "0.13.2" } From c2c555573eb373e5a4dfbac8533a711ed236bb2f Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Thu, 16 Jun 2022 00:41:01 +0200 Subject: [PATCH 002/105] Fix the YouTube GDPR cookie not being sent along with requests (#2316) --- src/main/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index dbf6378eb3c1d..6a1582ab54526 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -147,7 +147,8 @@ function runApp() { session.defaultSession.cookies.set({ url: url, name: 'CONSENT', - value: 'YES+' + value: 'YES+', + sameSite: 'no_restriction' }) }) From c12d64c389a7bb1ecde6b4727859852701cb8baf Mon Sep 17 00:00:00 2001 From: bob1520 <80553357+hockerschwan@users.noreply.github.com> Date: Wed, 15 Jun 2022 22:41:26 +0000 Subject: [PATCH 003/105] add ? and * (#2318) --- src/renderer/store/modules/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index a0884a858de3e..a8bdb99e267b5 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -326,7 +326,7 @@ const actions = { if (platform === 'win32') { // https://www.boost.org/doc/libs/1_78_0/libs/filesystem/doc/portability_guide.htm // https://stackoverflow.com/questions/1976007/ - const noForbiddenChars = ['<', '>', ':', '"', '/', '|'].every(char => { + const noForbiddenChars = ['<', '>', ':', '"', '/', '|', '?', '*'].every(char => { return parsedString.indexOf(char) === -1 }) if (!noForbiddenChars) { From d1fc87da44ba558d5f428a10768ea7da9051e127 Mon Sep 17 00:00:00 2001 From: bob1520 <80553357+hockerschwan@users.noreply.github.com> Date: Sun, 19 Jun 2022 18:39:42 +0000 Subject: [PATCH 004/105] loop button color (#2313) --- src/renderer/components/ft-video-player/ft-video-player.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index fcdab490af703..2152a343fb32f 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -1167,8 +1167,8 @@ export default Vue.extend({ toggleVideoLoop: async function () { if (!this.player.loop()) { - const currentTheme = localStorage.getItem('mainColor') - const colorNames = this.$store.state.utils.colorClasses + const currentTheme = this.$store.state.settings.mainColor + const colorNames = this.$store.state.utils.colorNames const colorValues = this.$store.state.utils.colorValues const nameIndex = colorNames.findIndex((color) => { From c9c6b38627b61dce8b047f16cfd1b9a369b272e0 Mon Sep 17 00:00:00 2001 From: Svallinn <41585298+Svallinn@users.noreply.github.com> Date: Sun, 19 Jun 2022 20:09:24 +0100 Subject: [PATCH 005/105] Utils+Everywhere: Add a start offset tolerance for the external player (#2326) If a current video is practically over or the value in the history's watch progress is almost the same as the length of the video, it's safe to deduce that if the external player button is clicked, the user is most likely just rewatching the video, making no sense to pass a start offset to it --- src/renderer/components/ft-list-video/ft-list-video.js | 1 + src/renderer/components/watch-video-info/watch-video-info.js | 1 + src/renderer/store/modules/utils.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 682ecef111c4b..5f31a7ff0cbc0 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -252,6 +252,7 @@ export default Vue.extend({ watchProgress: this.watchProgress, playbackRate: this.defaultPlayback, videoId: this.id, + videoLength: this.data.lengthSeconds, playlistId: this.playlistId, playlistIndex: this.playlistIndex, playlistReverse: this.playlistReverse, diff --git a/src/renderer/components/watch-video-info/watch-video-info.js b/src/renderer/components/watch-video-info/watch-video-info.js index 8f2518fe97744..0d218f2baf18f 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -303,6 +303,7 @@ export default Vue.extend({ watchProgress: this.getTimestamp(), playbackRate: this.defaultPlayback, videoId: this.id, + videoLength: this.lengthSeconds, playlistId: this.playlistId, playlistIndex: this.getPlaylistIndex(), playlistReverse: this.getPlaylistReverse(), diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index a8bdb99e267b5..d0d2be5e7e6dd 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -895,7 +895,7 @@ const actions = { args.push(...defaultCustomArguments) } - if (payload.watchProgress > 0) { + if (payload.watchProgress > 0 && payload.watchProgress < payload.videoLength - 10) { if (typeof cmdArgs.startOffset === 'string') { args.push(`${cmdArgs.startOffset}${payload.watchProgress}`) } else { From 7dbed0e943e0b880a5b1f2d556b863b02fb40611 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Sun, 19 Jun 2022 21:27:11 +0200 Subject: [PATCH 006/105] Allow the lint workflow to run on all RC branches (#2337) --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 7402cf3fb1d1e..fe72c0b3df81f 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,7 +6,7 @@ name: Linter # events but only for the master branch on: pull_request: - branches: [ master, development ] + branches: [ master, development, '**-RC' ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: From 21f3862135309702eeeca5a02a14dfb277e4e62a Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Mon, 20 Jun 2022 04:01:59 +0200 Subject: [PATCH 007/105] Fix the theming of the share menu logos for the system, black and dracula themes (#2330) --- .../ft-share-button/ft-share-button.sass | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/ft-share-button/ft-share-button.sass b/src/renderer/components/ft-share-button/ft-share-button.sass index 21239972714a3..f5a7e1158bf31 100644 --- a/src/renderer/components/ft-share-button/ft-share-button.sass +++ b/src/renderer/components/ft-share-button/ft-share-button.sass @@ -29,10 +29,15 @@ width: auto @at-root - .dark & + .dark &, .system[data-system-theme*='dark'] & filter: brightness(0.868) - .light & + .black & + filter: brightness(0.933) + + /* no changes for the dracula theme */ + + .light &, .system[data-system-theme*='light'] & filter: invert(0.87) .invidious @@ -48,8 +53,11 @@ margin-right: 2px @at-root - .dark & + .dark &, + .black &, + .dracula &, + .system[data-system-theme*='dark'] & background-image: url(~../../assets/img/invidious-logo-dark.svg) - .light & + .light &, .system[data-system-theme*='light'] & background-image: url(~../../assets/img/invidious-logo-light.svg) From c68704363e767681b3f1ddf2d313058c227727b5 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Mon, 20 Jun 2022 17:44:02 +0200 Subject: [PATCH 008/105] Fix emojis displaying incorrectly (#2328) --- src/renderer/App.css | 2 +- .../watch-video-description/watch-video-description.css | 2 +- src/renderer/videoJS.css | 2 +- src/renderer/views/Channel/Channel.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/App.css b/src/renderer/App.css index dc7b3a870facf..70b98ebb20981 100644 --- a/src/renderer/App.css +++ b/src/renderer/App.css @@ -6,7 +6,7 @@ #app { display: flex; flex-wrap: wrap; - font-family: 'Roboto', sans-serif; + font-family: 'Roboto', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; } .routerView { diff --git a/src/renderer/components/watch-video-description/watch-video-description.css b/src/renderer/components/watch-video-description/watch-video-description.css index ef3c71c26a514..dc1d33c7d0799 100644 --- a/src/renderer/components/watch-video-description/watch-video-description.css +++ b/src/renderer/components/watch-video-description/watch-video-description.css @@ -4,7 +4,7 @@ } .description { - font-family: 'Roboto', sans-serif; + font-family: 'Roboto', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-size: 17px; white-space: pre-wrap; } diff --git a/src/renderer/videoJS.css b/src/renderer/videoJS.css index 8a3f4831cec61..7d56c1e272142 100644 --- a/src/renderer/videoJS.css +++ b/src/renderer/videoJS.css @@ -350,7 +350,7 @@ line-height: 1; font-weight: normal; font-style: normal; - font-family: Arial, Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; word-break: initial; } .video-js:-moz-full-screen { diff --git a/src/renderer/views/Channel/Channel.css b/src/renderer/views/Channel/Channel.css index 1c7109bcfe925..c117485107f44 100644 --- a/src/renderer/views/Channel/Channel.css +++ b/src/renderer/views/Channel/Channel.css @@ -108,7 +108,7 @@ } .aboutInfo { - font-family: 'Roboto', sans-serif; + font-family: 'Roboto', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-size: 17px; white-space: pre-wrap; } From 2be06bfa93c2caceb354a83795ee64da9028030f Mon Sep 17 00:00:00 2001 From: bob1520 <80553357+hockerschwan@users.noreply.github.com> Date: Tue, 21 Jun 2022 01:44:03 +0000 Subject: [PATCH 009/105] Fix download filename problems (#2310) * fix "illegal" filename and EISDIR * check download folder exists --- src/renderer/store/modules/utils.js | 49 ++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index d0d2be5e7e6dd..911385c81457e 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -1,6 +1,7 @@ import IsEqual from 'lodash.isequal' import FtToastEvents from '../../components/ft-toast/ft-toast-events' import fs from 'fs' +import path from 'path' import i18n from '../../i18n/index' import { IpcChannels } from '../../../constants' @@ -180,8 +181,41 @@ const actions = { } }, + replaceFilenameForbiddenChars(_, filenameOriginal) { + let filenameNew = filenameOriginal + let forbiddenChars = {} + switch (process.platform) { + case 'win32': + forbiddenChars = { + '<': '<', // U+FF1C + '>': '>', // U+FF1E + ':': ':', // U+FF1A + '"': '"', // U+FF02 + '/': '/', // U+FF0F + '\\': '\', // U+FF3C + '|': '|', // U+FF5C + '?': '?', // U+FF1F + '*': '*' // U+FF0A + } + break + case 'darwin': + forbiddenChars = { '/': '/', ':': ':' } + break + case 'linux': + forbiddenChars = { '/': '/' } + break + default: + break + } + + for (const forbiddenChar in forbiddenChars) { + filenameNew = filenameNew.replaceAll(forbiddenChar, forbiddenChars[forbiddenChar]) + } + return filenameNew + }, + async downloadMedia({ rootState, dispatch }, { url, title, extension, fallingBackPath }) { - const fileName = `${title}.${extension}` + const fileName = `${await dispatch('replaceFilenameForbiddenChars', title)}.${extension}` const usingElectron = rootState.settings.usingElectron const locale = i18n._vm.locale const translations = i18n._vm.messages[locale] @@ -213,6 +247,19 @@ const actions = { } folderPath = response.filePath + } else { + if (!fs.existsSync(folderPath)) { + try { + fs.mkdirSync(folderPath, { recursive: true }) + } catch (err) { + console.error(err) + this.showToast({ + message: err + }) + return + } + } + folderPath = path.join(folderPath, fileName) } dispatch('showToast', { From 6c198b47a3778738d42fbec3028607d93ef9ba86 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Tue, 21 Jun 2022 10:31:56 +0800 Subject: [PATCH 010/105] * Update app menu to add item for new window (#2314) with keyboard shortcut --- src/main/index.js | 16 +++++++++++++++- static/locales/en-US.yaml | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index 6a1582ab54526..ca7e0f3e27b25 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -770,7 +770,21 @@ function runApp() { const template = [ { label: 'File', - submenu: [{ role: 'quit' }] + submenu: [ + { + label: 'New Window', + accelerator: 'CmdOrCtrl+N', + click: (_menuItem, _browserWindow, _event) => { + createWindow({ + replaceMainWindow: false, + showWindowNow: true + }) + }, + type: 'normal' + }, + { type: 'separator' }, + { role: 'quit' } + ] }, { label: 'Edit', diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index f47df3ad1d1d9..e5eac17d8dde2 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -7,6 +7,7 @@ FreeTube: FreeTube # Webkit Menu Bar File: File +New Window: New Window Quit: Quit Edit: Edit Undo: Undo From dd879b68c1871b2f38d9f72af42bf902e6d2c714 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Tue, 21 Jun 2022 04:33:53 +0200 Subject: [PATCH 011/105] Fix removing the meta files when navigating to a new video (#2345) --- src/renderer/views/Watch/Watch.js | 41 +++++++++++++++++-------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index c3210f1516471..a26fe1003f286 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -29,11 +29,11 @@ export default Vue.extend({ 'watch-video-recommendations': WatchVideoRecommendations }, beforeRouteLeave: function (to, from, next) { - this.handleRouteChange() + this.handleRouteChange(this.videoId) window.removeEventListener('beforeunload', this.handleWatchProgress) next() }, - data: function() { + data: function () { return { isLoading: false, firstLoad: true, @@ -144,13 +144,13 @@ export default Vue.extend({ hideVideoLikesAndDislikes: function () { return this.$store.getters.getHideVideoLikesAndDislikes }, - theatrePossible: function() { + theatrePossible: function () { return !this.hideRecommendedVideos || (!this.hideLiveChat && this.isLive) || this.watchingPlaylist } }, watch: { $route() { - this.handleRouteChange() + this.handleRouteChange(this.videoId) // react to route changes... this.videoId = this.$route.params.id @@ -220,14 +220,14 @@ export default Vue.extend({ window.addEventListener('beforeunload', this.handleWatchProgress) }, methods: { - changeTimestamp: function(timestamp) { + changeTimestamp: function (timestamp) { this.$refs.videoPlayer.player.currentTime(timestamp) }, - toggleTheatreMode: function() { + toggleTheatreMode: function () { this.useTheatreMode = !this.useTheatreMode }, - getVideoInformationLocal: function() { + getVideoInformationLocal: function () { if (this.firstLoad) { this.isLoading = true } @@ -535,7 +535,7 @@ export default Vue.extend({ }) }, - getVideoInformationInvidious: function() { + getVideoInformationInvidious: function () { if (this.firstLoad) { this.isLoading = true } @@ -967,7 +967,11 @@ export default Vue.extend({ this.playNextCountDownIntervalId = setInterval(showCountDownMessage, 1000) }, - handleRouteChange: async function () { + handleRouteChange: async function (videoId) { + // if the user navigates to another video, the ipc call for the userdata path + // takes long enough for the video id to have already changed to the new one + // receiving it as an arg instead of accessing it ourselves means we always have the right one + clearTimeout(this.playNextTimeout) clearInterval(this.playNextCountDownIntervalId) @@ -977,14 +981,13 @@ export default Vue.extend({ const player = this.$refs.videoPlayer.player if (player !== null && !player.paused() && player.isInPictureInPicture()) { - const playerId = this.videoId setTimeout(() => { player.play() player.on('leavepictureinpicture', (event) => { const watchTime = player.currentTime() if (this.$route.fullPath.includes('/watch')) { const routeId = this.$route.params.id - if (routeId === playerId) { + if (routeId === videoId) { const activePlayer = $('.ftVideoPlayer video').get(0) activePlayer.currentTime = watchTime } @@ -1000,23 +1003,23 @@ export default Vue.extend({ if (this.removeVideoMetaFiles) { const userData = await this.getUserDataPath() if (this.isDev) { - const dashFileLocation = `static/dashFiles/${this.videoId}.xml` - const vttFileLocation = `static/storyboards/${this.videoId}.vtt` + const dashFileLocation = `static/dashFiles/${videoId}.xml` + const vttFileLocation = `static/storyboards/${videoId}.vtt` // only delete the file it actually exists - if (fs.existsSync('static/dashFiles/') && fs.existsSync(dashFileLocation)) { + if (fs.existsSync(dashFileLocation)) { fs.rmSync(dashFileLocation) } - if (fs.existsSync('static/storyboards/') && fs.existsSync(vttFileLocation)) { + if (fs.existsSync(vttFileLocation)) { fs.rmSync(vttFileLocation) } } else { - const dashFileLocation = `${userData}/dashFiles/${this.videoId}.xml` - const vttFileLocation = `${userData}/storyboards/${this.videoId}.vtt` + const dashFileLocation = `${userData}/dashFiles/${videoId}.xml` + const vttFileLocation = `${userData}/storyboards/${videoId}.vtt` - if (fs.existsSync(`${userData}/dashFiles/`) && fs.existsSync(dashFileLocation)) { + if (fs.existsSync(dashFileLocation)) { fs.rmSync(dashFileLocation) } - if (fs.existsSync(`${userData}/storyboards/`) && fs.existsSync(vttFileLocation)) { + if (fs.existsSync(vttFileLocation)) { fs.rmSync(vttFileLocation) } } From 4a5d0916531f52377177877fd40d83332eed59c4 Mon Sep 17 00:00:00 2001 From: bob1520 <80553357+hockerschwan@users.noreply.github.com> Date: Fri, 24 Jun 2022 21:53:00 +0000 Subject: [PATCH 012/105] clear filter in userplaylists and history when clicked "clear input" (#2350) --- src/renderer/components/ft-input/ft-input.js | 2 ++ src/renderer/views/History/History.vue | 1 + src/renderer/views/UserPlaylists/UserPlaylists.vue | 1 + 3 files changed, 4 insertions(+) diff --git a/src/renderer/components/ft-input/ft-input.js b/src/renderer/components/ft-input/ft-input.js index f4fb14c9aa774..98d2afae72623 100644 --- a/src/renderer/components/ft-input/ft-input.js +++ b/src/renderer/components/ft-input/ft-input.js @@ -126,6 +126,8 @@ export default Vue.extend({ // Focus on input element after text is clear for better UX inputElement.focus() + + this.$emit('clear') }, handleActionIconChange: function() { diff --git a/src/renderer/views/History/History.vue b/src/renderer/views/History/History.vue index 9703421c5d7b9..4b6e64242deee 100644 --- a/src/renderer/views/History/History.vue +++ b/src/renderer/views/History/History.vue @@ -16,6 +16,7 @@ :show-clear-text-button="true" :show-action-button="false" @input="(input) => query = input" + @clear="query = ''" /> Date: Thu, 30 Jun 2022 20:54:05 +0200 Subject: [PATCH 013/105] Fix right clicking on links being treated as link clicks (#2356) --- src/renderer/App.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index 74780713867d4..fee872301e9a7 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -334,14 +334,17 @@ export default Vue.extend({ }) $(document).on('auxclick', 'a[href^="http"]', (event) => { - this.handleLinkClick(event) + // auxclick fires for all clicks not performed with the primary button + // only handle the link click if it was the middle button, + // otherwise the context menu breaks + if (event.button === 1) { + this.handleLinkClick(event) + } }) }, handleLinkClick: function (event) { const el = event.currentTarget - console.log(this.usingElectron) - console.log(el) event.preventDefault() // Check if it's a YouTube link From 7a374ac3122ca912af88e0d9b267ce3d10f12d19 Mon Sep 17 00:00:00 2001 From: bob1520 <80553357+hockerschwan@users.noreply.github.com> Date: Fri, 1 Jul 2022 08:30:00 +0000 Subject: [PATCH 014/105] search suggestion out of index (#2354) --- src/renderer/components/ft-input/ft-input.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/ft-input/ft-input.js b/src/renderer/components/ft-input/ft-input.js index 98d2afae72623..052112010520f 100644 --- a/src/renderer/components/ft-input/ft-input.js +++ b/src/renderer/components/ft-input/ft-input.js @@ -199,13 +199,13 @@ export default Vue.extend({ }, handleKeyDown: function (keyCode) { - if (this.dataList.length === 0) { return } + if (this.visibleDataList.length === 0) { return } // Update selectedOption based on arrow key pressed if (keyCode === 40) { - this.searchState.selectedOption = (this.searchState.selectedOption + 1) % this.dataList.length + this.searchState.selectedOption = (this.searchState.selectedOption + 1) % this.visibleDataList.length } else if (keyCode === 38) { - if (this.searchState.selectedOption === -1) { - this.searchState.selectedOption = this.dataList.length - 1 + if (this.searchState.selectedOption < 1) { + this.searchState.selectedOption = this.visibleDataList.length - 1 } else { this.searchState.selectedOption-- } From 04c276ca73a62db8c9ecdeddc38b9acbf0c469e9 Mon Sep 17 00:00:00 2001 From: Luca Hohmann <34301369+GilgusMaximus@users.noreply.github.com> Date: Thu, 7 Jul 2022 21:04:08 +0200 Subject: [PATCH 015/105] Fix blog banner layout (#2300) (#2383) * Fix blog banner layout * Fix banner stretching with no content Co-authored-by: vallode <18506096+vallode@users.noreply.github.com> --- src/renderer/App.css | 8 +++++--- src/renderer/App.vue | 32 ++++++++++++++++---------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/renderer/App.css b/src/renderer/App.css index 70b98ebb20981..11b789b33de6e 100644 --- a/src/renderer/App.css +++ b/src/renderer/App.css @@ -15,12 +15,14 @@ } .banner { - width: 85%; + margin: 16px auto 0 auto; + width: 90%; } .flexBox { - margin-top: 60px; - margin-bottom: -75px; + margin: 0; + flex: 1 1 0%; + flex-direction: column; } #changeLogText { diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 9b00dc4086586..569693173cd9c 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -9,10 +9,8 @@ > - + + - - - - - + Date: Sat, 9 Jul 2022 17:30:02 +0200 Subject: [PATCH 016/105] Fix long video links in the video description breaking the layout (#2382) --- .../watch-video-description/watch-video-description.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/components/watch-video-description/watch-video-description.css b/src/renderer/components/watch-video-description/watch-video-description.css index dc1d33c7d0799..c34953dde31f6 100644 --- a/src/renderer/components/watch-video-description/watch-video-description.css +++ b/src/renderer/components/watch-video-description/watch-video-description.css @@ -7,4 +7,5 @@ font-family: 'Roboto', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-size: 17px; white-space: pre-wrap; + overflow-wrap: anywhere; } From d9bce866449de32c77073bf541b48b51d10b94a1 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Sat, 9 Jul 2022 19:31:35 +0200 Subject: [PATCH 017/105] Fixes search suggestion issues with arrow keys (#2371) * Fix cursor moving while cycling through search suggestions * Fix the search suggestions changing for all keyboard events * Remove use of deprecated event.keyCode --- src/renderer/components/ft-input/ft-input.js | 15 +++++++-------- src/renderer/components/ft-input/ft-input.vue | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/renderer/components/ft-input/ft-input.js b/src/renderer/components/ft-input/ft-input.js index 052112010520f..e1a6ae695af17 100644 --- a/src/renderer/components/ft-input/ft-input.js +++ b/src/renderer/components/ft-input/ft-input.js @@ -184,7 +184,7 @@ export default Vue.extend({ if (inputElement !== null) { inputElement.addEventListener('keydown', (event) => { - if (event.keyCode === 13) { + if (event.key === 'Enter') { this.handleClick() } }) @@ -198,12 +198,12 @@ export default Vue.extend({ this.handleClick() }, - handleKeyDown: function (keyCode) { + handleKeyDown: function (event) { if (this.visibleDataList.length === 0) { return } // Update selectedOption based on arrow key pressed - if (keyCode === 40) { + if (event.key === 'ArrowDown') { this.searchState.selectedOption = (this.searchState.selectedOption + 1) % this.visibleDataList.length - } else if (keyCode === 38) { + } else if (event.key === 'ArrowUp') { if (this.searchState.selectedOption < 1) { this.searchState.selectedOption = this.visibleDataList.length - 1 } else { @@ -214,14 +214,13 @@ export default Vue.extend({ } // Key pressed isn't enter - if (keyCode !== 13) { + if (event.key !== 'Enter') { this.searchState.showOptions = true } // Update Input box value if arrow keys were pressed - if ((keyCode === 40 || keyCode === 38) && this.searchState.selectedOption !== -1) { + if ((event.key === 'ArrowDown' || event.key === 'ArrowUp') && this.searchState.selectedOption !== -1) { + event.preventDefault() this.inputData = this.visibleDataList[this.searchState.selectedOption] - } else { - this.updateVisibleDataList() } }, diff --git a/src/renderer/components/ft-input/ft-input.vue b/src/renderer/components/ft-input/ft-input.vue index 26c321f3ae191..91f9eb7f953ea 100644 --- a/src/renderer/components/ft-input/ft-input.vue +++ b/src/renderer/components/ft-input/ft-input.vue @@ -49,7 +49,7 @@ @input="e => handleInput(e.target.value)" @focus="handleFocus" @blur="handleInputBlur" - @keydown="e => handleKeyDown(e.keyCode)" + @keydown="handleKeyDown" > Date: Sat, 16 Jul 2022 11:30:20 +0200 Subject: [PATCH 018/105] Fix for banner and too far scrolling (#2398) * Fix for banner and too far scrolling * Update App.css --- src/renderer/App.css | 13 +++++++------ src/renderer/App.vue | 36 ++++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/renderer/App.css b/src/renderer/App.css index 11b789b33de6e..f04531d2c82dd 100644 --- a/src/renderer/App.css +++ b/src/renderer/App.css @@ -7,6 +7,7 @@ display: flex; flex-wrap: wrap; font-family: 'Roboto', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + height: 100%; } .routerView { @@ -15,14 +16,13 @@ } .banner { - margin: 16px auto 0 auto; - width: 90%; + width: 80%; + margin: 0 auto; } .flexBox { - margin: 0; - flex: 1 1 0%; - flex-direction: column; + margin-top: 60px; + display: block; } #changeLogText { @@ -44,7 +44,8 @@ } .banner { - width: 90%; + width: 80%; + margin-top: 60px; } .flexBox { diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 569693173cd9c..85d2e18b49da0 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -9,21 +9,25 @@ > - - -