diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6fbd40c95d04f..cb49b32397ef2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,6 +8,27 @@ updates: - "PR: waiting for review" - "PR: dependencies" open-pull-requests-limit: 15 + groups: + babel: + patterns: + - "@babel/*" + - "babel-*" + eslint: + patterns: + - "eslint" + - "eslint-*" + - "yaml-eslint-parser" + - "vue-eslint-parser" + stylelint: + patterns: + - "stylelint" + - "stylelint-*" + - "postcss" + - "postcss-*" + - "@double-great/stylelint-a11y" + fortawesome: + patterns: + - "@fortawesome/*" - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6a14f1678372..2577d16349f73 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: diff --git a/.github/workflows/calibreapp-image-actions.yml b/.github/workflows/calibreapp-image-actions.yml index bf2ed2886edcc..f94e1ac32c843 100644 --- a/.github/workflows/calibreapp-image-actions.yml +++ b/.github/workflows/calibreapp-image-actions.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compress Images id: calibre uses: calibreapp/image-actions@main diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f7c01e4fa4aae..500b94b7d3239 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 74d4a0f475882..83ad8fe80862f 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: flathub/io.freetubeapp.FreeTube token: ${{ secrets.FLATHUB_TOKEN }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index fa58643dd86d3..542d643b84938 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -17,7 +17,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2b08ad6e3e3b..5312a30926627 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000..2f3cb81cc2abd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "dev-runner (Electron)", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/_scripts/dev-runner.js", + "args": ["--remote-debug"] + }, + { + "name": "Attach to renderer process (Electron)", + "type": "chrome", + "request": "attach", + "port": 9223, + "webRoot": "http://localhost:9080", + "sourceMapPathOverrides": { + "webpack://freetube/./~/*": "${workspaceFolder}/node_modules/*", + "webpack://freetube/./*": "${workspaceFolder}/*" + } + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 3c0971b857e18..0000000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "dev", - "problemMatcher": [] - }, - { - "type": "npm", - "script": "dev-runner", - "problemMatcher": [], - "label": "npm: dev-runner", - "detail": "node _scripts/dev-runner.js" - } - ] -} diff --git a/package.json b/package.json index d5f451c5f8ad0..a7ede245d9416 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "autolinker": "^4.0.0", "electron-context-menu": "^3.6.1", "lodash.debounce": "^4.0.8", - "marked": "^7.0.5", + "marked": "^8.0.0", "path-browserify": "^1.0.1", "process": "^0.11.10", "video.js": "7.21.5", @@ -78,20 +78,20 @@ "vue-router": "^3.6.5", "vue-tiny-slider": "^0.1.39", "vuex": "^3.6.2", - "youtubei.js": "^6.1.0" + "youtubei.js": "^6.3.0" }, "devDependencies": { - "@babel/core": "^7.22.11", - "@babel/eslint-parser": "^7.22.11", + "@babel/core": "^7.22.15", + "@babel/eslint-parser": "^7.22.15", "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/preset-env": "^7.22.10", + "@babel/preset-env": "^7.22.15", "@double-great/stylelint-a11y": "^2.0.2", "babel-loader": "^9.1.3", "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.8.1", "css-minimizer-webpack-plugin": "^5.0.1", "electron": "^22.3.18", - "electron-builder": "^24.6.3", + "electron-builder": "^24.6.4", "eslint": "^8.48.0", "eslint-config-prettier": "^9.0.0", "eslint-config-standard": "^17.1.0", @@ -107,10 +107,10 @@ "html-webpack-plugin": "^5.5.3", "js-yaml": "^4.1.0", "json-minimizer-webpack-plugin": "^4.0.0", - "lefthook": "^1.4.9", + "lefthook": "^1.4.10", "mini-css-extract-plugin": "^2.7.6", "npm-run-all": "^4.1.5", - "postcss": "^8.4.26", + "postcss": "^8.4.29", "postcss-scss": "^4.0.7", "prettier": "^2.8.8", "rimraf": "^5.0.1", diff --git a/src/main/index.js b/src/main/index.js index a469578e21e8d..26866b694d8d2 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -472,8 +472,12 @@ function runApp() { searchQueryText = null } = { }) { // Syncing new window background to theme choice. - const windowBackground = await baseHandlers.settings._findTheme().then(({ value }) => { - switch (value) { + const windowBackground = await baseHandlers.settings._findTheme().then((setting) => { + if (!setting) { + return nativeTheme.shouldUseDarkColors ? '#212121' : '#f1f1f1' + } + + switch (setting.value) { case 'dark': return '#212121' case 'light': diff --git a/src/renderer/components/channel-about/channel-about.js b/src/renderer/components/channel-about/channel-about.js index d0571276aae8e..feac9f71e23fe 100644 --- a/src/renderer/components/channel-about/channel-about.js +++ b/src/renderer/components/channel-about/channel-about.js @@ -61,10 +61,5 @@ export default defineComponent({ formattedViews: function () { return formatNumber(this.views) }, - }, - methods: { - goToChannel: function (id) { - this.$router.push({ path: `/channel/${id}` }) - }, } }) diff --git a/src/renderer/components/channel-about/channel-about.vue b/src/renderer/components/channel-about/channel-about.vue index d10f00138d14c..e1100dbd15d63 100644 --- a/src/renderer/components/channel-about/channel-about.vue +++ b/src/renderer/components/channel-about/channel-about.vue @@ -90,10 +90,9 @@ diff --git a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.css b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.css index a0bf13f51c6ce..4c4b3f57161d4 100644 --- a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.css +++ b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.css @@ -9,6 +9,8 @@ align-items: center; gap: 16px; overflow: hidden; + color: inherit; + text-decoration: none; -webkit-transition: background 0.2s ease-out; -moz-transition: background 0.2s ease-out; -o-transition: background 0.2s ease-out; diff --git a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js index d3d2430de624f..c9854b34d6eb6 100644 --- a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js +++ b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js @@ -1,9 +1,12 @@ import { defineComponent } from 'vue' -import { sanitizeForHtmlId } from '../../helpers/accessibility' export default defineComponent({ name: 'FtChannelBubble', props: { + channelId: { + type: String, + required: true + }, channelName: { type: String, required: true @@ -24,15 +27,12 @@ export default defineComponent({ }, computed: { sanitizedId: function() { - return 'channelBubble' + sanitizeForHtmlId(this.channelName) + return 'channelBubble' + this.channelId } }, methods: { handleClick: function (event) { if (event instanceof KeyboardEvent) { - if (event.target.getAttribute('role') === 'link' && event.key !== 'Enter') { - return - } event.preventDefault() } diff --git a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.vue b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.vue index 278d96ff343c2..53abe2f282c36 100644 --- a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.vue +++ b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.vue @@ -1,6 +1,26 @@