diff --git a/.github/workflows/calibreapp-image-actions.yml b/.github/workflows/calibreapp-image-actions.yml index f94e1ac32c843..d336cad2328ab 100644 --- a/.github/workflows/calibreapp-image-actions.yml +++ b/.github/workflows/calibreapp-image-actions.yml @@ -20,7 +20,7 @@ jobs: compressOnly: true - name: Create New Pull Request If Needed if: steps.calibre.outputs.markdown != '' - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: title: Compressed Images Nightly branch-suffix: timestamp diff --git a/.github/workflows/label-issue.yml b/.github/workflows/label-issue.yml index 46eed6d43bfae..24e42dc04f3c9 100644 --- a/.github/workflows/label-issue.yml +++ b/.github/workflows/label-issue.yml @@ -11,7 +11,7 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v3.3 + - uses: github/issue-labeler@v3.4 with: configuration-path: .github/issue-labeler.yml enable-versioned-regex: 0 diff --git a/_icons/iconNordicLightSmall.png b/_icons/iconNordicLightSmall.png new file mode 100644 index 0000000000000..b5b83494c8e56 Binary files /dev/null and b/_icons/iconNordicLightSmall.png differ diff --git a/_icons/textNordicLightSmall.png b/_icons/textNordicLightSmall.png new file mode 100644 index 0000000000000..b23422a08c14f Binary files /dev/null and b/_icons/textNordicLightSmall.png differ diff --git a/_scripts/webpack.renderer.config.js b/_scripts/webpack.renderer.config.js index 057be25f4a65b..385b6e29abd8d 100644 --- a/_scripts/webpack.renderer.config.js +++ b/_scripts/webpack.renderer.config.js @@ -1,5 +1,5 @@ const path = require('path') -const { readFileSync } = require('fs') +const { readFileSync, readdirSync } = require('fs') const webpack = require('webpack') const HtmlWebpackPlugin = require('html-webpack-plugin') const VueLoaderPlugin = require('vue-loader/lib/plugin') @@ -117,7 +117,8 @@ const config = { new webpack.DefinePlugin({ 'process.env.IS_ELECTRON': true, 'process.env.IS_ELECTRON_MAIN': false, - 'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames) + 'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames), + 'process.env.GEOLOCATION_NAMES': JSON.stringify(readdirSync(path.join(__dirname, '..', 'static', 'geolocations')).map(filename => filename.replace('.json', ''))) }), new HtmlWebpackPlugin({ excludeChunks: ['processTaskWorker'], diff --git a/package.json b/package.json index 5dc59259508ad..3a6bdfb639834 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "core-js": "^3.35.1", "electron-context-menu": "^3.6.1", "lodash.debounce": "^4.0.8", - "marked": "^11.1.1", + "marked": "^11.2.0", "path-browserify": "^1.0.1", "process": "^0.11.10", "swiper": "^11.0.5", @@ -83,51 +83,51 @@ "youtubei.js": "^8.2.0" }, "devDependencies": { - "@babel/core": "^7.23.7", - "@babel/eslint-parser": "^7.23.3", + "@babel/core": "^7.23.9", + "@babel/eslint-parser": "^7.23.10", "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/preset-env": "^7.23.8", - "@double-great/stylelint-a11y": "^3.0.0", + "@babel/preset-env": "^7.23.9", + "@double-great/stylelint-a11y": "^3.0.1", "babel-loader": "^9.1.3", "copy-webpack-plugin": "^12.0.2", - "css-loader": "^6.9.1", + "css-loader": "^6.10.0", "css-minimizer-webpack-plugin": "^6.0.0", - "electron": "^28.1.4", + "electron": "^28.2.1", "electron-builder": "^24.9.1", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsonc": "^2.11.2", + "eslint-plugin-jsonc": "^2.13.0", "eslint-plugin-n": "^16.6.2", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-unicorn": "^50.0.1", - "eslint-plugin-vue": "^9.20.1", - "eslint-plugin-vuejs-accessibility": "^2.2.0", - "eslint-plugin-yml": "^1.11.0", + "eslint-plugin-vue": "^9.21.1", + "eslint-plugin-vuejs-accessibility": "^2.2.1", + "eslint-plugin-yml": "^1.12.2", "html-webpack-plugin": "^5.6.0", "js-yaml": "^4.1.0", "json-minimizer-webpack-plugin": "^5.0.0", - "lefthook": "^1.6.0", - "mini-css-extract-plugin": "^2.7.7", + "lefthook": "^1.6.1", + "mini-css-extract-plugin": "^2.8.0", "npm-run-all": "^4.1.5", "postcss": "^8.4.33", "postcss-scss": "^4.0.9", "prettier": "^2.8.8", "rimraf": "^5.0.5", "sass": "^1.70.0", - "sass-loader": "^14.0.0", - "stylelint": "^16.2.0", + "sass-loader": "^14.1.0", + "stylelint": "^16.2.1", "stylelint-config-sass-guidelines": "^11.0.0", "stylelint-config-standard": "^36.0.0", "stylelint-high-performance-animation": "^1.10.0", "stylelint-use-logical-spec": "^5.0.1", "tree-kill": "1.2.2", "vue-devtools": "^5.1.4", - "vue-eslint-parser": "^9.3.2", + "vue-eslint-parser": "^9.4.2", "vue-loader": "^15.10.0", - "webpack": "^5.89.0", + "webpack": "^5.90.1", "webpack-cli": "^5.1.4", "webpack-dev-server": "^4.15.1", "webpack-watch-external-files-plugin": "^3.0.0", diff --git a/src/main/index.js b/src/main/index.js index 23b561cee10b4..2f8944c88df09 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -493,6 +493,8 @@ function runApp() { return '#ffd1dc' case 'hot-pink': return '#de1c85' + case 'nordic': + return '#2b2f3a' case 'system': default: return nativeTheme.shouldUseDarkColors ? '#212121' : '#f1f1f1' 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 1a4878d64cb3c..701c0eb961aff 100644 --- a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.css +++ b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.css @@ -25,6 +25,7 @@ block-size: 50px; border-radius: 100%; -webkit-border-radius: 100%; + object-fit: cover; } .selected { diff --git a/src/renderer/components/ft-community-post/ft-community-post.scss b/src/renderer/components/ft-community-post/ft-community-post.scss index 64a618cfe9f4e..838cb658ba719 100644 --- a/src/renderer/components/ft-community-post/ft-community-post.scss +++ b/src/renderer/components/ft-community-post/ft-community-post.scss @@ -144,5 +144,5 @@ } .sliderContainer { - display: block; + display: grid; } diff --git a/src/renderer/components/ft-community-post/ft-community-post.vue b/src/renderer/components/ft-community-post/ft-community-post.vue index d5701b660fe24..053bd4c61a59d 100644 --- a/src/renderer/components/ft-community-post/ft-community-post.vue +++ b/src/renderer/components/ft-community-post/ft-community-post.vue @@ -56,27 +56,25 @@ class="postText" v-html="postText" /> -
- + - - - - -
+ +
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 @@ + + +