diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 2857ad4f5870..464ec55de035 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -75,24 +75,25 @@ body: required: true - type: dropdown attributes: - label: 'Installation Method (If applicable)' + label: Installation Method options: + - .apk - .AppImage + - AUR + - Chocolatey - .deb - .dmg - .exe - Flathub + - .pacman - Portable + - PortableApps - .rpm + - winget - .zip - other validations: - required: false - - type: input - attributes: - label: 'Last Known Working FreeTube Version (If Any)' - description: What is the last version of FreeTube this worked in, if applicable? - placeholder: v0.14.0 + required: true - type: dropdown attributes: label: Primary API used @@ -102,7 +103,12 @@ body: - Local API - Invidious API validations: - required: false + required: true + - type: input + attributes: + label: 'Last Known Working FreeTube Version (If Any)' + description: What is the last version of FreeTube this worked in, if applicable? + placeholder: v0.14.0 - type: textarea attributes: label: Additional Information diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 199861da0bcd..4b21f07a9f52 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -9,6 +9,8 @@ We may remove your pull request if you do not use this provided PR template corr Please select what type of pull request this is: - [ ] Bugfix - [ ] Feature Implementation +- [ ] Documentation +- [ ] Other **Related issue** Please link the issue your pull request is referring to. If this pull request fully resolves the relevant issue, put "closes" before the issue number. Example: "closes #123456". diff --git a/.github/workflows/autoLabelIssue.yaml b/.github/workflows/autoLabelIssue.yaml index 4eb6736f52fb..adf9a90c23e9 100644 --- a/.github/workflows/autoLabelIssue.yaml +++ b/.github/workflows/autoLabelIssue.yaml @@ -10,5 +10,5 @@ jobs: - uses: Naturalclar/issue-action@v2.0.2 with: body: "both" - parameters: '[ {"keywords": ["visual bug"], "labels": ["B: visual"]}, {"keywords": ["keyboard control not working"], "labels": ["B: keyboard control"]}, {"keywords": ["text/string issue"], "labels": ["B: text/string"]}, {"keywords": ["content not loading"], "labels": ["B: content not loading"]}, {"keywords": ["accessibility issue"], "labels": ["B: accessibility"]}, {"keywords": ["usability issue"], "labels": ["B: usability"]}, {"keywords": ["causes crash"], "labels": ["B: crash"]}, {"keywords": ["feature stopped working"], "labels": ["B: feature stopped working"]}, {"keywords": ["inconsistent behavior"], "labels": ["B: inconsistent behavior"]}, {"keywords": ["data loss"], "labels": ["B: data loss"]}, {"keywords": ["race condition"], "labels": ["B: race condition"]}, {"keywords": ["API issue"], "labels": ["B: API issue"]}, {"keywords": ["only happens in developer mode"], "labels": ["B: developer mode"]}, {"keywords": ["improvement to existing feature"], "labels": ["E: improvement existing feature"]}, {"keywords": ["new optional setting"], "labels": ["E: new optional setting"]}, {"keywords": ["visual improvement"], "labels": ["E: visual improvement"]}, {"keywords": ["display more information to user"], "labels": ["E: display more information"]}, {"keywords": ["ease of use improvement"], "labels": ["E: ease of use improvement"]}, {"keywords": ["support for external software"], "labels": ["E: support external software"]}, {"keywords": ["new feature"], "labels": ["E: new feature"]}, {"keywords": ["new keyboard shortcut"], "labels": ["E: keyboard shortcut"]}]' + parameters: '[ {"keywords": ["visual bug"], "labels": ["B: visual"]}, {"keywords": ["AUR", "Chocolatey", "PortableApps", "winget"], "labels": ["B: Unofficial Download"]}, {"keywords": ["keyboard control not working"], "labels": ["B: keyboard control"]}, {"keywords": ["text/string issue"], "labels": ["B: text/string"]}, {"keywords": ["content not loading"], "labels": ["B: content not loading"]}, {"keywords": ["accessibility issue"], "labels": ["B: accessibility"]}, {"keywords": ["usability issue"], "labels": ["B: usability"]}, {"keywords": ["causes crash"], "labels": ["B: crash"]}, {"keywords": ["feature stopped working"], "labels": ["B: feature stopped working"]}, {"keywords": ["inconsistent behavior"], "labels": ["B: inconsistent behavior"]}, {"keywords": ["data loss"], "labels": ["B: data loss"]}, {"keywords": ["race condition"], "labels": ["B: race condition"]}, {"keywords": ["API issue"], "labels": ["B: API issue"]}, {"keywords": ["only happens in developer mode"], "labels": ["B: developer mode"]}, {"keywords": ["improvement to existing feature"], "labels": ["E: improvement existing feature"]}, {"keywords": ["new optional setting"], "labels": ["E: new optional setting"]}, {"keywords": ["visual improvement"], "labels": ["E: visual improvement"]}, {"keywords": ["display more information to user"], "labels": ["E: display more information"]}, {"keywords": ["ease of use improvement"], "labels": ["E: ease of use improvement"]}, {"keywords": ["support for external software"], "labels": ["E: support external software"]}, {"keywords": ["new feature"], "labels": ["E: new feature"]}, {"keywords": ["new keyboard shortcut"], "labels": ["E: keyboard shortcut"]}]' github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8dc0f5f8cf07..77b99a85fcbe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: runtime: [ linux-x64, linux-arm64, win-x64, osx-x64 ] include: - runtime: linux-x64 - os: ubuntu-18.04 + os: ubuntu-latest - runtime: linux-arm64 os: ubuntu-latest diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index fe72c0b3df81..3b9015b9c9ae 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -13,7 +13,7 @@ jobs: # This workflow contains a single job called "build" lint: # The type of runner that the job will run on - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: diff --git a/README.md b/README.md index 8eb6f8450fd9..a7acefd3eccd 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,12 @@ addressed. ### Browser Extension -FreeTube is supported by the [Privacy Redirect](https://github.com/SimonBrazell/privacy-redirect) extension, which will allow you to open YouTube links into FreeTube. You must enable the option within the advanced settings for it to work. +FreeTube is supported by the [Privacy Redirect](https://github.com/SimonBrazell/privacy-redirect) and [LibRedirect](https://github.com/libredirect/libredirect) extension, which will allow you to open YouTube links into FreeTube. You must enable the option within the advanced settings for it to work. Download Privacy Redirect for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/privacy-redirect/) or [Google Chrome](https://chrome.google.com/webstore/detail/privacy-redirect/pmcmeagblkinmogikoikkdjiligflglb). +Download LibRedirect for [Firefox](https://addons.mozilla.org/firefox/addon/libredirect/) or [Google Chrome](https://github.com/libredirect/libredirect/blob/master/chromium.md). + Disclaimer: Learn more about why a browser extension is bad for your [privacy](https://www.privacyguides.org/browsers/#extensions). If you have issues with the extension working with FreeTube, please create an issue in this repository instead of the extension repository. @@ -62,7 +64,7 @@ Arch User Repository (AUR): [Download](https://aur.archlinux.org/packages/freetu Chocolatey: [Download](https://chocolatey.org/packages/freetube/) -Windows Portable: [Download](https://github.com/rddim/FreeTubePortable/releases) [Source](https://github.com/rddim/FreeTubePortable) +PortableApps (Windows Only): [Download](https://github.com/rddim/FreeTubePortable/releases) [Source](https://github.com/rddim/FreeTubePortable) Windows Package Manager (winget): [Usage](https://docs.microsoft.com/en-us/windows/package-manager/winget/) diff --git a/_icons/iconCatppuccinMochaDarkSmall.png b/_icons/iconCatppuccinMochaDarkSmall.png new file mode 100644 index 000000000000..bfc93ad5690d Binary files /dev/null and b/_icons/iconCatppuccinMochaDarkSmall.png differ diff --git a/_icons/iconCatppuccinMochaLightSmall.png b/_icons/iconCatppuccinMochaLightSmall.png new file mode 100644 index 000000000000..021f62670c98 Binary files /dev/null and b/_icons/iconCatppuccinMochaLightSmall.png differ diff --git a/_icons/textCatppuccinMochaDarkSmall.png b/_icons/textCatppuccinMochaDarkSmall.png new file mode 100644 index 000000000000..e2fba035e852 Binary files /dev/null and b/_icons/textCatppuccinMochaDarkSmall.png differ diff --git a/_icons/textCatppuccinMochaLightSmall.png b/_icons/textCatppuccinMochaLightSmall.png new file mode 100644 index 000000000000..70e96901016f Binary files /dev/null and b/_icons/textCatppuccinMochaLightSmall.png differ diff --git a/_scripts/build.js b/_scripts/build.js index 7d92b13b4670..6b762cc76772 100644 --- a/_scripts/build.js +++ b/_scripts/build.js @@ -53,7 +53,28 @@ const config = { ] } ], - files: ['_icons/iconColor.*', 'icon.svg', './dist/**/*', '!./dist/web/**/*'], + files: [ + '_icons/iconColor.*', + 'icon.svg', + './dist/**/*', + '!dist/web/*', + '!**/node_modules/**/.*', + '!**/node_modules/**/index.html', + '!**/{.github,Jenkinsfile}', + '!**/{CHANGES.md,CODE_OF_CONDUCT.md,CONTRIBUTING.md,CONTRIBUTION.md,DEVELOPMENT.md,docs,docs.md,docs.mli,examples,History.md,HISTORY.md,README.md,TODO.md,UPGRADE_GUIDE.md,UPGRADING.md}', + '!**/{commitlint.config.js,.editorconfig,.eslintignore,.eslintrc.{js,yml},.gitmodules,.huskyrc,.lintstagedrc,.nvmrc,.nycrc{,.json},.prettierrc{,.yaml},tslint.json}', + '!**/{.babelrc,bower.json,Gruntfile.js,Makefile,.npmrc.proregistry,rollup.config.js,.tm_properties,.tool-versions,tsconfig.json,webpack.config.js}', + '!**/*.{{,c,m}js,min,ts}.map', + '!**/*.d.ts', + + // only exclude the src directory for specific packages + // as some of them have their dist code in there and we don't want to exclude those + '!**/node_modules/{@fortawesome/vue-fontawesome,agent-base,jquery,localforage,m3u8-parser,marked,mpd-parser,performance-now,video.js,vue,vue-i18n,vue-router}/src/*', + '!**/node_modules/**/{bin,man,scripts}/*', + '!**/node_modules/jquery/dist/jquery.slim*.js', + '!**/node_modules/video.js/dist/{alt/*,video.js}', + '!**/node_modules/@videojs/*/src' + ], dmg: { contents: [ { @@ -125,6 +146,7 @@ builder .build({ targets, config, + publish: 'never' }) .then(m => { console.log(m) diff --git a/_scripts/webpack.main.config.js b/_scripts/webpack.main.config.js index c87c3cbb71fc..d7316fd74293 100644 --- a/_scripts/webpack.main.config.js +++ b/_scripts/webpack.main.config.js @@ -23,7 +23,7 @@ const config = { module: { rules: [ { - test: /\.(j|t)s$/, + test: /\.js$/, use: 'babel-loader', exclude: /node_modules/, }, @@ -76,21 +76,24 @@ if (isDevMode) { from: path.join(__dirname, '../static'), to: path.join(__dirname, '../dist/web/static'), globOptions: { - ignore: ['.*', 'pwabuilder-sw.js'], + dot: true, + ignore: ['**/.*', '**/pwabuilder-sw.js', '**/dashFiles/**', '**/storyboards/**'], }, }, { from: path.join(__dirname, '../_icons'), to: path.join(__dirname, '../dist/_icons'), globOptions: { - ignore: ['.*'], + dot: true, + ignore: ['**/.*'], }, }, { from: path.join(__dirname, '../src/renderer/assets/img'), to: path.join(__dirname, '../dist/images'), globOptions: { - ignore: ['.*'], + dot: true, + ignore: ['**/.*'], }, }, ] diff --git a/_scripts/webpack.renderer.config.js b/_scripts/webpack.renderer.config.js index e8da417952cd..4f73ce068158 100644 --- a/_scripts/webpack.renderer.config.js +++ b/_scripts/webpack.renderer.config.js @@ -37,7 +37,7 @@ const config = { module: { rules: [ { - test: /\.(j|t)s$/, + test: /\.js$/, use: 'babel-loader', exclude: /node_modules/, }, @@ -165,28 +165,32 @@ if (isDevMode) { from: path.join(__dirname, '../static'), to: path.join(__dirname, '../dist/web/static'), globOptions: { - ignore: ['.*', 'pwabuilder-sw.js'], + dot: true, + ignore: ['**/.*', '**/pwabuilder-sw.js', '**/dashFiles/**', '**/storyboards/**'], }, }, { from: path.join(__dirname, '../static'), to: path.join(__dirname, '../dist/static'), globOptions: { - ignore: ['.*', 'pwabuilder-sw.js'], + dot: true, + ignore: ['**/.*', '**/pwabuilder-sw.js', '**/dashFiles/**', '**/storyboards/**'], }, }, { from: path.join(__dirname, '../_icons'), to: path.join(__dirname, '../dist/web/_icons'), globOptions: { - ignore: ['.*'], + dot: true, + ignore: ['**/.*'], }, }, { from: path.join(__dirname, '../src/renderer/assets/img'), to: path.join(__dirname, '../dist/web/images'), globOptions: { - ignore: ['.*'], + dot: true, + ignore: ['**/.*'], }, }, ] diff --git a/_scripts/webpack.web.config.js b/_scripts/webpack.web.config.js index a95913d5f58f..1b15f319f080 100644 --- a/_scripts/webpack.web.config.js +++ b/_scripts/webpack.web.config.js @@ -23,7 +23,7 @@ const config = { module: { rules: [ { - test: /\.(j|t)s$/, + test: /\.js$/, use: 'babel-loader', exclude: /node_modules/, }, @@ -163,21 +163,24 @@ if (isDevMode) { from: path.join(__dirname, '../static'), to: path.join(__dirname, '../dist/web/static'), globOptions: { - ignore: ['.*', 'pwabuilder-sw.js'], + dot: true, + ignore: ['**/.*', '**/pwabuilder-sw.js', '**/dashFiles/**', '**/storyboards/**'], }, }, { from: path.join(__dirname, '../_icons'), to: path.join(__dirname, '../dist/web/_icons'), globOptions: { - ignore: ['.*'], + dot: true, + ignore: ['**/.*'], }, }, { from: path.join(__dirname, '../src/renderer/assets/img'), to: path.join(__dirname, '../dist/web/images'), globOptions: { - ignore: ['.*'], + dot: true, + ignore: ['**/.*'], }, }, ] diff --git a/_scripts/webpack.workers.config.js b/_scripts/webpack.workers.config.js index 7b6bb8421425..7ca42754f518 100644 --- a/_scripts/webpack.workers.config.js +++ b/_scripts/webpack.workers.config.js @@ -26,7 +26,7 @@ const config = { module: { rules: [ { - test: /\.(j|t)s$/, + test: /\.js$/, use: 'babel-loader', exclude: /node_modules/, }, diff --git a/package.json b/package.json index a63a0b8e45fe..e8861bcbe62e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "freetube", "productName": "FreeTube", "description": "A private YouTube client", - "version": "0.17.0", + "version": "0.17.1", "license": "AGPL-3.0-or-later", "main": "./dist/main.js", "private": true, @@ -25,7 +25,7 @@ "build-release": "node _scripts/build.js", "build-release:arm64": "node _scripts/build.js arm64", "build-release:arm32": "node _scripts/build.js arm32", - "clean": "rimraf build/ dashFiles/ dist/ storyboards/", + "clean": "rimraf build/ static/dashFiles/ dist/ static/storyboards/", "debug": "run-s rebuild:electron debug-runner", "debug-runner": "node _scripts/dev-runner.js --remote-debug", "dev": "run-s rebuild:electron dev-runner", @@ -60,7 +60,7 @@ "js-yaml": "^4.1.0", "lodash.debounce": "^4.0.8", "lodash.isequal": "^4.5.0", - "marked": "^4.0.15", + "marked": "^4.0.17", "nedb-promises": "^5.0.1", "opml-to-json": "^1.0.1", "rss-parser": "^3.12.0", @@ -79,7 +79,7 @@ "yt-channel-info": "^3.0.4", "yt-dash-manifest-generator": "1.1.0", "yt-trending-scraper": "^2.0.1", - "ytdl-core": "^4.11.0", + "ytdl-core": "git+https://github.com/absidue/node-ytdl-core#temp-fix-11-08-2022", "ytpl": "^2.3.0", "ytsr": "^3.8.0" }, @@ -92,7 +92,7 @@ "copy-webpack-plugin": "^9.0.1", "css-loader": "5.2.6", "electron": "^16.2.7", - "electron-builder": "^22.11.7", + "electron-builder": "^23.0.3", "electron-builder-squirrel-windows": "^22.13.1", "electron-debug": "^3.2.0", "eslint": "^7.32.0", @@ -104,11 +104,9 @@ "eslint-plugin-promise": "^5.1.0", "eslint-plugin-standard": "^5.0.0", "eslint-plugin-vue": "^7.17.0", - "fast-glob": "^3.2.7", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.3.2", "mini-css-extract-plugin": "^2.2.2", - "node-abi": "^2.30.1", "node-loader": "^2.0.0", "npm-run-all": "^4.1.5", "prettier": "^2.3.2", diff --git a/src/main/index.js b/src/main/index.js index ca7e0f3e27b2..7c733b7c3c71 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -185,6 +185,8 @@ function runApp() { return '#000000' case 'dracula': return '#282a36' + case 'catppuccin-mocha': + return '#1e1e2e' case 'system': default: return nativeTheme.shouldUseDarkColors ? '#212121' : '#f1f1f1' @@ -816,8 +818,12 @@ function runApp() { { role: 'toggledevtools' }, { type: 'separator' }, { role: 'resetzoom' }, - { role: 'zoomin' }, + { role: 'resetzoom', accelerator: 'CmdOrCtrl+num0', visible: false }, + { role: 'zoomin', accelerator: 'CmdOrCtrl+Plus' }, + { role: 'zoomin', accelerator: 'CmdOrCtrl+=', visible: false }, + { role: 'zoomin', accelerator: 'CmdOrCtrl+numadd', visible: false }, { role: 'zoomout' }, + { role: 'zoomout', accelerator: 'CmdOrCtrl+numsub', visible: false }, { type: 'separator' }, { role: 'togglefullscreen' } ] diff --git a/src/renderer/components/distraction-settings/distraction-settings.js b/src/renderer/components/distraction-settings/distraction-settings.js index 790368b43dd4..891cf7021550 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.js +++ b/src/renderer/components/distraction-settings/distraction-settings.js @@ -45,6 +45,18 @@ export default Vue.extend({ }, hideActiveSubscriptions: function () { return this.$store.getters.getHideActiveSubscriptions + }, + hideVideoDescription: function () { + return this.$store.getters.getHideVideoDescription + }, + hideComments: function () { + return this.$store.getters.getHideComments + }, + hideLiveStreams: function() { + return this.$store.getters.getHideLiveStreams + }, + hideSharingActions: function() { + return this.$store.getters.getHideSharingActions } }, methods: { @@ -68,7 +80,11 @@ export default Vue.extend({ 'updateHideLiveChat', 'updateHideActiveSubscriptions', 'updatePlayNextVideo', - 'updateDefaultTheatreMode' + 'updateDefaultTheatreMode', + 'updateHideVideoDescription', + 'updateHideComments', + 'updateHideLiveStreams', + 'updateHideSharingActions' ]) } }) diff --git a/src/renderer/components/distraction-settings/distraction-settings.vue b/src/renderer/components/distraction-settings/distraction-settings.vue index aef21062d13a..4c59582d6f22 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.vue +++ b/src/renderer/components/distraction-settings/distraction-settings.vue @@ -38,6 +38,18 @@ :default-value="hideActiveSubscriptions" @change="updateHideActiveSubscriptions" /> + +
+ +

diff --git a/src/renderer/components/external-player-settings/external-player-settings.js b/src/renderer/components/external-player-settings/external-player-settings.js index 04d7bd260740..f847a98748db 100644 --- a/src/renderer/components/external-player-settings/external-player-settings.js +++ b/src/renderer/components/external-player-settings/external-player-settings.js @@ -24,7 +24,10 @@ export default Vue.extend({ }, externalPlayerNames: function () { - return this.$store.getters.getExternalPlayerNames + const fallbackNames = this.$store.getters.getExternalPlayerNames + const nameTranslationKeys = this.$store.getters.getExternalPlayerNameTranslationKeys + + return nameTranslationKeys.map((translationKey, idx) => this.$te(translationKey) ? this.$t(translationKey) : fallbackNames[idx]) }, externalPlayerValues: function () { return this.$store.getters.getExternalPlayerValues diff --git a/src/renderer/components/ft-age-restricted/ft-age-restricted.js b/src/renderer/components/ft-age-restricted/ft-age-restricted.js new file mode 100644 index 000000000000..5769012b54a8 --- /dev/null +++ b/src/renderer/components/ft-age-restricted/ft-age-restricted.js @@ -0,0 +1,22 @@ +import Vue from 'vue' + +export default Vue.extend({ + name: 'FtAgeRestricted', + props: { + contentTypeString: { + type: String, + required: true + } + }, + computed: { + emoji: function () { + const emojis = ['😵', '😦', '🙁', '☹️', '😦', '🤫', '😕'] + return emojis[Math.floor(Math.random() * emojis.length)] + }, + + restrictedMessage: function () { + const contentType = this.$t('Age Restricted.Type.' + this.contentTypeString) + return this.$t('Age Restricted.This $contentType is age restricted').replace('$contentType', contentType) + } + } +}) diff --git a/src/renderer/components/ft-age-restricted/ft-age-restricted.sass b/src/renderer/components/ft-age-restricted/ft-age-restricted.sass new file mode 100644 index 000000000000..58d44107401f --- /dev/null +++ b/src/renderer/components/ft-age-restricted/ft-age-restricted.sass @@ -0,0 +1,14 @@ +.ft-age-restricted + color: var(--primary-text-color) + h2 + width: 100% + text-align: center + background-color: var(--card-bg-color) + padding: 10px 0 + .frown + width: 100% + text-align: center + background-color: var(--card-bg-color) + font-size: 10em + padding: 20px 0 + height: 100% diff --git a/src/renderer/components/ft-age-restricted/ft-age-restricted.vue b/src/renderer/components/ft-age-restricted/ft-age-restricted.vue new file mode 100644 index 000000000000..abc2eac85c25 --- /dev/null +++ b/src/renderer/components/ft-age-restricted/ft-age-restricted.vue @@ -0,0 +1,15 @@ + + +