Skip to content

Commit

Permalink
Merge branch 'development' into feature/auto-load-next-page
Browse files Browse the repository at this point in the history
* development: (72 commits)
  Add support for CommentViews in video comments (#4806)
  Add support for LockupViews on the channel podcasts tab (#4767)
  Bump youtubei.js from 9.1.0 to 9.2.0 (#4836)
  Bump swiper from 11.0.7 to 11.1.0 (#4837)
  Bump the stylelint group with 1 update (#4835)
  Bump the eslint group with 1 update (#4834)
  Bump electron from 29.1.5 to 29.1.6 (#4838)
  Translated using Weblate (Estonian)
  Fix v-observe-visibility error when playlist items are updated (#4774)
  Fix extracting the subscriber count from channel PageHeader nodes (#4804)
  Translated using Weblate (Portuguese)
  Create empty subscriptions cache objects directly instead of cloning (#4814)
  Parse compact numbers without using floating point numbers to avoid accuracy issues (#4817)
  Fix the left arrow key not working on the first button in prompts (#4816)
  Fix the web build's manifest.json file getting included in the electron build (#4815)
  Move usingElectron from computed into data (#4810)
  Stop setting node modules path now that we bundle the modules (#4809)
  Translated using Weblate (Bulgarian)
  Bump express from 4.18.1 to 4.19.2 (#4812)
  Translated using Weblate (Portuguese (Brazil))
  ...
  • Loading branch information
PikachuEXE committed Apr 2, 2024
2 parents 7293722 + 455216c commit 020f991
Show file tree
Hide file tree
Showing 46 changed files with 1,210 additions and 1,023 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autoLabelDuplicate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:

jobs:
test:
if: github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER'
runs-on: ubuntu-latest
steps:
- name: Check Comment Author
if: github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER'
uses: Amwam/[email protected]
with:
keywords: '["duplicate of #", "duplicate of https://github.com/FreeTubeApp/FreeTube/issues/", "duplicate of https://github.com/FreeTubeApp/FreeTube/pulls/"]'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autoMerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:

jobs:
build:
if: ${{ !github.event.pull_request.draft && (contains(github.event.pull_request.base.ref, 'development') || contains(github.event.pull_request.base.ref, 'RC')) }}
runs-on: ubuntu-latest

steps:
- name: Auto Merge PR
if: ${{ !github.event.pull_request.draft && (contains(github.event.pull_request.base.ref, 'development') || contains(github.event.pull_request.base.ref, 'RC')) }}
run: |
echo ${{ secrets.PUSH_TOKEN }} >> auth.txt
gh auth login --with-token < auth.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install xmlstarlet
run: sudo apt -y install xmlstarlet
- name: Create Version Variable
uses: bluwy/substitute-string-action@v2
uses: bluwy/substitute-string-action@v3
id: sub
with:
_input-text: ${{ fromJson(steps.api_results.outputs.result).tag_name }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/remove-outdated-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
- uses: mondeja/remove-labels-gh-action@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Expand All @@ -27,7 +27,7 @@ jobs:
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged) && (github.event.action != 'converted_to_draft') && (github.event.action != 'ready_for_review')
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
- uses: mondeja/remove-labels-gh-action@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Expand All @@ -43,7 +43,7 @@ jobs:
if: github.event_name == 'pull_request_target' && github.event.action == 'converted_to_draft'
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
- uses: mondeja/remove-labels-gh-action@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Expand All @@ -54,7 +54,7 @@ jobs:
if: github.event_name == 'pull_request_target' && github.event.action == 'ready_for_review'
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
- uses: mondeja/remove-labels-gh-action@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Expand Down
2 changes: 1 addition & 1 deletion _scripts/webpack.main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (!isDevMode) {
to: path.join(__dirname, '../dist/static'),
globOptions: {
dot: true,
ignore: ['**/.*', '**/locales/**', '**/pwabuilder-sw.js', '**/dashFiles/**', '**/storyboards/**'],
ignore: ['**/.*', '**/locales/**', '**/pwabuilder-sw.js', '**/manifest.json', '**/dashFiles/**', '**/storyboards/**'],
},
},
]
Expand Down
5 changes: 1 addition & 4 deletions _scripts/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ const config = {
new HtmlWebpackPlugin({
excludeChunks: ['processTaskWorker'],
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
nodeModules: isDevMode
? path.resolve(__dirname, '../node_modules')
: false,
template: path.resolve(__dirname, '../src/index.ejs')
}),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({
Expand Down
3 changes: 1 addition & 2 deletions _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ const config = {
new HtmlWebpackPlugin({
excludeChunks: ['processTaskWorker'],
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
nodeModules: false,
template: path.resolve(__dirname, '../src/index.ejs')
}),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"marked": "^12.0.1",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"swiper": "^11.0.7",
"swiper": "^11.1.0",
"video.js": "7.21.5",
"videojs-contrib-quality-levels": "^3.0.0",
"videojs-http-source-selector": "^1.1.6",
Expand All @@ -77,56 +77,56 @@
"vue-observe-visibility": "^1.0.0",
"vue-router": "^3.6.5",
"vuex": "^3.6.2",
"youtubei.js": "^9.1.0"
"youtubei.js": "^9.2.0"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/eslint-parser": "^7.23.10",
"@babel/core": "^7.24.3",
"@babel/eslint-parser": "^7.24.1",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/preset-env": "^7.24.0",
"@babel/preset-env": "^7.24.3",
"@double-great/stylelint-a11y": "^3.0.2",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^6.10.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"electron": "^29.1.1",
"electron": "^29.1.6",
"electron-builder": "^24.13.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsonc": "^2.13.0",
"eslint-plugin-jsonc": "^2.14.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-vue": "^9.22.0",
"eslint-plugin-vue": "^9.24.0",
"eslint-plugin-vuejs-accessibility": "^2.2.1",
"eslint-plugin-yml": "^1.12.2",
"eslint-plugin-yml": "^1.13.2",
"html-webpack-plugin": "^5.6.0",
"js-yaml": "^4.1.0",
"json-minimizer-webpack-plugin": "^5.0.0",
"lefthook": "^1.6.5",
"lefthook": "^1.6.7",
"mini-css-extract-plugin": "^2.8.1",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.35",
"postcss": "^8.4.38",
"postcss-scss": "^4.0.9",
"prettier": "^2.8.8",
"rimraf": "^5.0.5",
"sass": "^1.71.1",
"sass": "^1.72.0",
"sass-loader": "^14.1.1",
"stylelint": "^16.2.1",
"stylelint-config-sass-guidelines": "^11.0.0",
"stylelint": "^16.3.1",
"stylelint-config-sass-guidelines": "^11.1.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.4.2",
"vue-loader": "^15.10.0",
"webpack": "^5.90.3",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.2",
"webpack-dev-server": "^5.0.4",
"webpack-watch-external-files-plugin": "^3.0.0",
"yaml-eslint-parser": "^1.2.2"
}
Expand Down
7 changes: 0 additions & 7 deletions src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
<link rel="manifest" href="static/manifest.json" />
<% } %>
<title></title>
<% if (htmlWebpackPlugin.options.nodeModules) { %>
<script>
require('module').globalPaths.push(
`<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, '\\\\') %>`
)
</script>
<% } %>
</head>

<body>
Expand Down
4 changes: 0 additions & 4 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ function runApp() {
app.commandLine.appendSwitch('enable-features', 'VaapiVideoDecodeLinuxGL')
}

// Work around for context menus in the devtools being displayed behind the window
// https://github.com/electron/electron/issues/38790
app.commandLine.appendSwitch('disable-features', 'WidgetLayering')

// command line switches need to be added before the app ready event first
// that means we can't use the normal settings system as that is asynchronous,
// doing it synchronously ensures that we add it before the event fires
Expand Down
1 change: 0 additions & 1 deletion src/renderer/components/ft-card/ft-card.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<div
class="ft-card"
@focusout="$emit('focusout')"
>
<slot />
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/components/ft-icon-button/ft-icon-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ export default defineComponent({
}
},

handleDropdownEscape: function () {
this.$refs.iconButton.focus()
// handleDropdownFocusOut will hide the dropdown for us
},

handleDropdownClick: function ({ url, index }) {
if (this.returnIndex) {
this.$emit('click', index)
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/ft-icon-button/ft-icon-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
top: dropdownPositionY === 'top'
}"
@focusout="handleDropdownFocusOut"
@keydown.esc.stop="handleDropdownEscape"
>
<slot>
<ul
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export default defineComponent({
data: function () {
return {
visible: false,
show: true
show: true,
stopWatchingInitialVisibleState: null
}
},
computed: {
Expand Down Expand Up @@ -111,13 +112,29 @@ export default defineComponent({
},
created() {
this.visible = this.initialVisibleState

if (!this.initialVisibleState) {
this.stopWatchingInitialVisibleState = this.$watch('initialVisibleState', (newValue) => {
this.visible = newValue
this.stopWatchingInitialVisibleState()
this.stopWatchingInitialVisibleState = null
})
}
},
methods: {
onVisibilityChanged: function (visible) {
if (visible && this.shouldBeVisible) {
this.visible = visible
if (this.stopWatchingInitialVisibleState) {
this.stopWatchingInitialVisibleState()
this.stopWatchingInitialVisibleState = null
}
} else if (visible) {
this.show = false
if (this.stopWatchingInitialVisibleState) {
this.stopWatchingInitialVisibleState()
this.stopWatchingInitialVisibleState = null
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<div
v-show="show"
v-observe-visibility="!initialVisibleState ? {
v-observe-visibility="initialVisibleState || visible ? false : {
callback: onVisibilityChanged,
once: true,
} : null"
}"
:class="{ placeholder: !visible }"
>
<template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export default defineComponent({
}
},

handleProfileListEscape: function () {
this.$refs.iconButton.focus()
// handleProfileListFocusOut will hide the dropdown for us
},

setActiveProfile: function (profile) {
if (this.activeProfile._id !== profile._id) {
const targetProfile = this.profileList.find((x) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div>
<div
ref="iconButton"
class="colorOption"
:title="$t('Profile.Toggle Profile List')"
:style="{ background: activeProfile.bgColor, color: activeProfile.textColor }"
Expand All @@ -25,7 +26,8 @@
ref="profileList"
class="profileList"
tabindex="-1"
@focusout="handleProfileListFocusOut"
@focusout.native="handleProfileListFocusOut"
@keydown.native.esc.stop="handleProfileListEscape"
>
<h3
id="profileListTitle"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/ft-prompt/ft-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default defineComponent({
focusItem: function (value) {
let index = value
if (index < 0) {
index = this.promptButtons.length
index = this.promptButtons.length - 1
} else if (index >= this.promptButtons.length) {
index = 0
}
Expand Down
5 changes: 1 addition & 4 deletions src/renderer/components/player-settings/player-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default defineComponent({
},
data: function () {
return {
usingElectron: process.env.IS_ELECTRON,
formatValues: [
'dash',
'legacy',
Expand Down Expand Up @@ -60,10 +61,6 @@ export default defineComponent({
}
},
computed: {
usingElectron: function () {
return process.env.IS_ELECTRON
},

backendPreference: function () {
return this.$store.getters.getBackendPreference
},
Expand Down
5 changes: 1 addition & 4 deletions src/renderer/components/theme-settings/theme-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default defineComponent({
},
data: function () {
return {
usingElectron: process.env.IS_ELECTRON,
minUiScale: 50,
maxUiScale: 300,
uiScaleStep: 5,
Expand Down Expand Up @@ -122,10 +123,6 @@ export default defineComponent({

areColorThemesEnabled: function() {
return this.baseTheme !== 'hotPink'
},

usingElectron: function () {
return process.env.IS_ELECTRON
}
},
mounted: function () {
Expand Down
Loading

0 comments on commit 020f991

Please sign in to comment.