From 91611ac8a64c74b14e93d9f79405ad44496c5e0c Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 28 Aug 2022 12:32:39 +0200 Subject: [PATCH 01/62] fix the autoplay preference --- src/components/WatchVideo.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index d6a46c89..3a0d9ad0 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -325,7 +325,7 @@ export default { }, activated() { this.active = true; - this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", false); + this.selectedAutoPlay = this.getPreferenceBoolean("playerAutoPlay", false); this.showDesc = !this.getPreferenceBoolean("minimizeDescription", false); this.showRecs = !this.getPreferenceBoolean("minimizeRecommendations", false); if (this.video.duration) { @@ -360,7 +360,7 @@ export default { return this.fetchJson(this.apiUrl() + "/comments/" + this.getVideoId()); }, onChange() { - this.setPreference("autoplay", this.selectedAutoPlay); + this.setPreference("playerAutoPlay", this.selectedAutoPlay); }, async getVideoData() { await this.fetchVideo() From 7cef1a840d0e516fd09d90099a73afba9b1aaace Mon Sep 17 00:00:00 2001 From: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com> Date: Sun, 28 Aug 2022 20:34:25 -0700 Subject: [PATCH 02/62] Pass timestamp when redirecting youtu.be style --- src/components/VideoRedirect.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VideoRedirect.vue b/src/components/VideoRedirect.vue index 91763534..be13ac65 100644 --- a/src/components/VideoRedirect.vue +++ b/src/components/VideoRedirect.vue @@ -9,7 +9,7 @@ export default { if (videoId) this.$router.replace({ path: "/watch", - query: { v: videoId }, + query: { v: videoId, t: this.$route.query.t }, }); }, }; From 527f5640174df0f6699b7ef3a1d152dff756ae08 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 28 Aug 2022 12:32:39 +0200 Subject: [PATCH 03/62] Revert "fix the autoplay preference" This reverts commit 91611ac8a64c74b14e93d9f79405ad44496c5e0c. --- src/components/WatchVideo.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index 3a0d9ad0..d6a46c89 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -325,7 +325,7 @@ export default { }, activated() { this.active = true; - this.selectedAutoPlay = this.getPreferenceBoolean("playerAutoPlay", false); + this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", false); this.showDesc = !this.getPreferenceBoolean("minimizeDescription", false); this.showRecs = !this.getPreferenceBoolean("minimizeRecommendations", false); if (this.video.duration) { @@ -360,7 +360,7 @@ export default { return this.fetchJson(this.apiUrl() + "/comments/" + this.getVideoId()); }, onChange() { - this.setPreference("playerAutoPlay", this.selectedAutoPlay); + this.setPreference("autoplay", this.selectedAutoPlay); }, async getVideoData() { await this.fetchVideo() From 471e81f55628572d2114f7621a7173e04eb8e64a Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 17 Aug 2022 19:04:57 +0530 Subject: [PATCH 04/62] Initial migration to UnoCSS. --- package.json | 9 +- src/App.vue | 14 +- src/components/ChaptersBar.vue | 15 +- src/components/CommentItem.vue | 4 +- src/components/NavBar.vue | 10 +- src/components/PreferencesPage.vue | 6 +- src/components/SearchSuggestions.vue | 6 +- src/components/SubscriptionsPage.vue | 2 +- src/components/VideoItem.vue | 2 +- src/components/WatchVideo.vue | 14 +- src/main.js | 7 +- uno.config.js | 34 ++ vite.config.js | 4 +- windi.config.js | 23 -- yarn.lock | 543 ++++++++++++++++++++++++--- 15 files changed, 578 insertions(+), 115 deletions(-) create mode 100644 uno.config.js delete mode 100644 windi.config.js diff --git a/package.json b/package.json index 5bd4d491..1492cb8c 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,12 @@ "xml-js": "^1.6.11" }, "devDependencies": { + "@iconify/json": "^2.1.94", "@intlify/vite-plugin-vue-i18n": "^6.0.1", + "@unocss/preset-icons": "^0.45.7", + "@unocss/preset-web-fonts": "^0.45.7", + "@unocss/transformer-directives": "^0.45.7", + "@unocss/transformer-variant-group": "^0.45.7", "@vitejs/plugin-legacy": "^1.8.2", "@vitejs/plugin-vue": "^2.3.4", "@vue/compiler-sfc": "3.2.37", @@ -36,10 +41,10 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.3.0", "prettier": "^2.7.1", + "unocss": "^0.45.7", "vite": "^2.9.14", "vite-plugin-eslint": "^1.7.0", - "vite-plugin-pwa": "^0.12.3", - "vite-plugin-windicss": "^1.8.7" + "vite-plugin-pwa": "^0.12.3" }, "eslintConfig": { "root": true, diff --git a/src/App.vue b/src/App.vue index 25a13a04..76938920 100644 --- a/src/App.vue +++ b/src/App.vue @@ -102,11 +102,11 @@ b { } .video-grid { - @apply grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 col-auto -
+

{{ $t("video.chapters") }} ({{ chapters.length }})

@@ -45,16 +45,17 @@ } .chapter { @apply cursor-pointer self-center p-2.5; - img { - @apply w-full h-full; - } +} +.chapter img { + @apply w-full h-full; } .chapter-vertical { @apply cursor-pointer self-center p-2.5; - img { - @apply w-3/10 h-3/10; - } } +.chapter-vertical img { + @apply w-3/10 h-3/10; +} + .chapter-vertical:hover { @apply bg-gray-500; } diff --git a/src/components/CommentItem.vue b/src/components/CommentItem.vue index 36e805b2..5a701651 100644 --- a/src/components/CommentItem.vue +++ b/src/components/CommentItem.vue @@ -24,8 +24,8 @@
- +
+

From 629303411c09996c4d8712f94d117c492b048309 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 29 Aug 2022 18:49:31 +0530 Subject: [PATCH 31/62] Add timestamp only if gt 0. --- src/components/ShareModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ShareModal.vue b/src/components/ShareModal.vue index 1274ee56..47cfb212 100644 --- a/src/components/ShareModal.vue +++ b/src/components/ShareModal.vue @@ -69,7 +69,7 @@ export default { var href = this.pipedLink ? window.location.origin + "/watch?v=" + this.videoId : "https://youtu.be/" + this.videoId; - if (this.withTimeCode && this.timeStamp) href += "?t=" + this.timeStamp; + if (this.withTimeCode && this.timeStamp > 0) href += "?t=" + this.timeStamp; return href; }, }, From bc6b2232a366d3dd83af8b4aa7e995de777dd74d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 13:07:20 +0000 Subject: [PATCH 32/62] Bump vite-plugin-eslint from 1.7.0 to 1.8.1 Bumps [vite-plugin-eslint](https://github.com/gxmari007/vite-plugin-eslint) from 1.7.0 to 1.8.1. - [Release notes](https://github.com/gxmari007/vite-plugin-eslint/releases) - [Changelog](https://github.com/gxmari007/vite-plugin-eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/gxmari007/vite-plugin-eslint/compare/v1.7.0...v1.8.1) --- updated-dependencies: - dependency-name: vite-plugin-eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 1492cb8c..de07c809 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "prettier": "^2.7.1", "unocss": "^0.45.7", "vite": "^2.9.14", - "vite-plugin-eslint": "^1.7.0", + "vite-plugin-eslint": "^1.8.1", "vite-plugin-pwa": "^0.12.3" }, "eslintConfig": { diff --git a/yarn.lock b/yarn.lock index 438b4246..6f6104b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3379,10 +3379,10 @@ rollup-plugin-terser@^7.0.0: serialize-javascript "^4.0.0" terser "^5.0.0" -rollup@^2.43.1, rollup@^2.59.0, rollup@^2.75.7, rollup@^2.77.0: - version "2.77.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.77.0.tgz#749eaa5ac09b6baa52acc076bc46613eddfd53f4" - integrity sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g== +rollup@^2.43.1, rollup@^2.59.0, rollup@^2.75.7, rollup@^2.77.2: + version "2.78.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.78.1.tgz#52fe3934d9c83cb4f7c4cb5fb75d88591be8648f" + integrity sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg== optionalDependencies: fsevents "~2.3.2" @@ -3814,14 +3814,14 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -vite-plugin-eslint@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vite-plugin-eslint/-/vite-plugin-eslint-1.7.0.tgz#195a19bc059fb40364c863f38924d556a623fb80" - integrity sha512-Kz2HwBeAArmsE0QmWSm+e7CaEQrfMkEZpFw4hngoy6JmERjw7WUH8HLbG1OkreOKX4iIUReOss9N1Mkw4wEk8g== +vite-plugin-eslint@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/vite-plugin-eslint/-/vite-plugin-eslint-1.8.1.tgz#0381b8272e7f0fd8b663311b64f7608d55d8b04c" + integrity sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang== dependencies: "@rollup/pluginutils" "^4.2.1" "@types/eslint" "^8.4.5" - rollup "^2.77.0" + rollup "^2.77.2" vite-plugin-pwa@^0.12.3: version "0.12.3" From 09e95df8010448c5511a4fbcfc26ab0f814c7a93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 13:07:52 +0000 Subject: [PATCH 33/62] Bump eslint-plugin-vue from 9.3.0 to 9.4.0 Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.3.0 to 9.4.0. - [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases) - [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.3.0...v9.4.0) --- updated-dependencies: - dependency-name: eslint-plugin-vue dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index de07c809..3f5c1651 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "eslint": "^7.32.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-vue": "^9.3.0", + "eslint-plugin-vue": "^9.4.0", "prettier": "^2.7.1", "unocss": "^0.45.7", "vite": "^2.9.14", diff --git a/yarn.lock b/yarn.lock index 6f6104b4..ab37377a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2173,10 +2173,10 @@ eslint-plugin-prettier@^4.2.1: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-vue@^9.3.0: - version "9.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.3.0.tgz#c3f5ce515dae387e062428725c5cf96098d9da0b" - integrity sha512-iscKKkBZgm6fGZwFt6poRoWC0Wy2dQOlwUPW++CiPoQiw1enctV2Hj5DBzzjJZfyqs+FAXhgzL4q0Ww03AgSmQ== +eslint-plugin-vue@^9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.4.0.tgz#31c2d9002b5bb437b351a5feffdf37c4397e5cb9" + integrity sha512-Nzz2QIJ8FG+rtJaqT/7/ru5ie2XgT9KCudkbN0y3uFYhQ41nuHEaboLAiqwMcK006hZPQv/rVMRhUIwEGhIvfQ== dependencies: eslint-utils "^3.0.0" natural-compare "^1.4.0" From 66a35b69fbfc69a220b5031dfcd5dd67d9e8f4a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 04:08:51 +0000 Subject: [PATCH 34/62] Bump aquiladev/ipfs-action from 0.3.0.pre.alpha.1 to 0.3.1.pre.alpha.1 Bumps [aquiladev/ipfs-action](https://github.com/aquiladev/ipfs-action) from 0.3.0.pre.alpha.1 to 0.3.1.pre.alpha.1. - [Release notes](https://github.com/aquiladev/ipfs-action/releases) - [Changelog](https://github.com/aquiladev/ipfs-action/blob/master/.release-it.json) - [Commits](https://github.com/aquiladev/ipfs-action/compare/v0.3.0-alpha.1...v0.3.1-alpha.1) --- updated-dependencies: - dependency-name: aquiladev/ipfs-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ipfs-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ipfs-build.yml b/.github/workflows/ipfs-build.yml index 5cb3fb09..9f414f5b 100644 --- a/.github/workflows/ipfs-build.yml +++ b/.github/workflows/ipfs-build.yml @@ -18,7 +18,7 @@ jobs: cache: "yarn" - run: yarn install --prefer-offline - run: yarn build && sed -i 's/fonts.gstatic.com/fonts.kavin.rocks/g' dist/assets/*.css && cp dist/index.html dist/ipfs-404.html - - uses: aquiladev/ipfs-action@v0.3.0-alpha.1 + - uses: aquiladev/ipfs-action@v0.3.1-alpha.1 id: ipfs-add with: path: ./dist From b984710b2322220cafa1ef0fa9cf52e4b9f8f183 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 13:10:22 +0000 Subject: [PATCH 35/62] Bump vue-router from 4.1.4 to 4.1.5 Bumps [vue-router](https://github.com/vuejs/router) from 4.1.4 to 4.1.5. - [Release notes](https://github.com/vuejs/router/releases) - [Commits](https://github.com/vuejs/router/compare/v4.1.4...v4.1.5) --- updated-dependencies: - dependency-name: vue-router dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3f5c1651..50d50ac9 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "stream": "^0.0.2", "vue": "^3.2.37", "vue-i18n": "^9.2.2", - "vue-router": "^4.1.4", + "vue-router": "^4.1.5", "xml-js": "^1.6.11" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index ab37377a..034ac2ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3870,10 +3870,10 @@ vue-i18n@^9.2.2: "@intlify/vue-devtools" "9.2.2" "@vue/devtools-api" "^6.2.1" -vue-router@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.1.4.tgz#290540caaf2c54e37a14dec047bd074002eca175" - integrity sha512-UgYen33gOtwT3cOG1+yRen+Brk9py8CSlC9LEa3UjvKZ4EAoSo8NjZPDeDnmNerfazorHIJG1NC7qdi1SuQJnQ== +vue-router@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.1.5.tgz#256f597e3f5a281a23352a6193aa6e342c8d9f9a" + integrity sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ== dependencies: "@vue/devtools-api" "^6.1.4" From cbe1c675e11e971e4edc864082d36bb158432435 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 13:10:56 +0000 Subject: [PATCH 36/62] Bump hotkeys-js from 3.9.4 to 3.9.5 Bumps [hotkeys-js](https://github.com/jaywcjlove/hotkeys) from 3.9.4 to 3.9.5. - [Release notes](https://github.com/jaywcjlove/hotkeys/releases) - [Commits](https://github.com/jaywcjlove/hotkeys/compare/v3.9.4...v3.9.5) --- updated-dependencies: - dependency-name: hotkeys-js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 50d50ac9..5f288be4 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@fortawesome/vue-fontawesome": "^3.0.1", "buffer": "^6.0.3", "dompurify": "^2.3.12", - "hotkeys-js": "^3.9.4", + "hotkeys-js": "^3.9.5", "javascript-time-ago": "^2.5.7", "mux.js": "^6.2.0", "shaka-player": "4.2.0", diff --git a/yarn.lock b/yarn.lock index 034ac2ee..94868d16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2590,10 +2590,10 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hotkeys-js@^3.9.4: - version "3.9.4" - resolved "https://registry.yarnpkg.com/hotkeys-js/-/hotkeys-js-3.9.4.tgz#ce1aa4c3a132b6a63a9dd5644fc92b8a9b9cbfb9" - integrity sha512-2zuLt85Ta+gIyvs4N88pCYskNrxf1TFv3LR9t5mdAZIX8BcgQQ48F2opUptvHa6m8zsy5v/a0i9mWzTrlNWU0Q== +hotkeys-js@^3.9.5: + version "3.9.5" + resolved "https://registry.yarnpkg.com/hotkeys-js/-/hotkeys-js-3.9.5.tgz#8314d0522bf2601e36003213047e9dc7d56d19fe" + integrity sha512-T0G8CUZ6Q1IOgPnLK1hDXR8DqgKF/VWEsHvZgi6CM7Ub9oOAzvWuJ3Qhc/9nFQaR26MfFOZSwULHrtCnsUX7zA== human-signals@^2.1.0: version "2.1.0" From 0afe3953a5a46ce633cf4c5801d2683ce8aef11d Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 29 Aug 2022 18:55:05 +0530 Subject: [PATCH 37/62] Add close button in share modal. --- src/components/ShareModal.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ShareModal.vue b/src/components/ShareModal.vue index 47cfb212..8ab2422f 100644 --- a/src/components/ShareModal.vue +++ b/src/components/ShareModal.vue @@ -1,6 +1,9 @@