Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
MarmadileManteater committed Oct 23, 2022
2 parents d8f7893 + a5bbbe7 commit ad945bd
Show file tree
Hide file tree
Showing 19 changed files with 237 additions and 216 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
node-version: [16.x]
runtime:
runtime:
- linux-x64
- linux-armv7l
- linux-arm64
Expand All @@ -29,7 +29,7 @@ jobs:

- runtime: linux-armv7l
os: ubuntu-latest

- runtime: linux-arm64
os: ubuntu-latest

Expand All @@ -38,7 +38,7 @@ jobs:

# - runtime: osx-arm64
# os: macOS-latest

- runtime: win-x64
os: windows-latest

Expand All @@ -54,8 +54,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: npm run ci
- run: npm run lint
- run: yarn run ci
- run: yarn run lint
- name: Get Version Number
uses: nyaayaya/package-version@v1
with:
Expand Down Expand Up @@ -92,20 +92,20 @@ jobs:


- name: Install libarchive-tools
if: startsWith(matrix.os, 'ubuntu')
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt -y install libarchive-tools; echo "Version Number ${{ toJson(job) }} ${{ toJson(needs) }}"

- name: Build x64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'x64')
run: npm run build --if-present
run: yarn run build

- name: Build ARMv7l with Node.js ${{ matrix.node-version}}
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l')
run: npm run build:arm32 --if-present
run: yarn run build:arm32

- name: Build ARM64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'arm64')
run: npm run build:arm64 --if-present
run: yarn run build:arm64

- name: Upload Linux .zip x64 Artifact
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
with:
name: freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb
path: build/freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb

- name: Upload .deb ARM64 Artifact
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64')
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
with:
name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.rpm
path: build/freetube-${{ steps.versionNumber.outputs.result }}.x86_64.rpm

# rpm are not built for armv7l

- name: Upload .rpm ARM64 Artifact
Expand All @@ -220,7 +220,7 @@ jobs:
with:
name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_armv7l.apk
path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.apk

- name: Upload Alpine .apk ARM64 Artifact
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64')
Expand Down Expand Up @@ -248,14 +248,14 @@ jobs:
with:
name: freetube-${{ steps.versionNumber.outputs.result }}-setup-x64.exe
path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe

- name: Upload Windows arm64 .exe Artifact
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64')
with:
name: freetube-${{ steps.versionNumber.outputs.result }}-setup-arm64.exe
path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe

- name: Upload Windows x64 .zip Artifact
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:
with:
name: freetube-${{ steps.versionNumber.outputs.result }}-win-arm64-portable.7z
path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-win.7z

- name: Upload Windows x64 Portable Artifact
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
Expand All @@ -297,21 +297,21 @@ jobs:
with:
name: freetube-${{ steps.versionNumber.outputs.result }}-portable-arm64.exe
path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe

- name: Upload Mac x64 .dmg Artifact
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
with:
name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.dmg
path: build/freetube-${{ steps.versionNumber.outputs.result }}.dmg

# - name: Upload Mac arm64 .dmg Artifact
# uses: actions/upload-artifact@v3
# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64')
# with:
# name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.dmg
# path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.dmg

- name: Upload Mac x64 .zip Artifact
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
with:
node-version: 16.x
cache: "yarn"
- run: npm run ci
- run: npm run lint
- run: yarn run ci
- run: yarn run lint
34 changes: 17 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
node-version: [16.x]
runtime:
runtime:
- linux-x64
- linux-armv7l
- linux-arm64
Expand All @@ -29,19 +29,19 @@ jobs:

- runtime: linux-armv7l
os: ubuntu-latest

- runtime: linux-arm64
os: ubuntu-latest

- runtime: osx-x64
os: macOS-latest

# - runtime: osx-arm64
# os: macOS-latest

- runtime: win-x64
os: windows-latest

- runtime: win-arm64
os: windows-latest

Expand All @@ -54,8 +54,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: npm run ci
- run: npm run lint
- run: yarn run ci
- run: yarn run lint

- name: Get Version Number
uses: nyaayaya/package-version@v1
Expand All @@ -65,15 +65,15 @@ jobs:

- name: Build x64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'x64')
run: npm run build --if-present
run: yarn run build

- name: Build ARMv7l with Node.js ${{ matrix.node-version}}
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l')
run: npm run build:arm32 --if-present
run: yarn run build:arm32

- name: Build ARM64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'arm64')
run: npm run build:arm64 --if-present
run: yarn run build:arm64

- name: Upload AppImage x64 Release
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
asset_name: freetube_${{ env.PACKAGE_VERSION }}_armv7l.deb
asset_path: build/freetube_${{ env.PACKAGE_VERSION }}_armv7l.deb
asset_content_type: application/vnd.debian.binary-package

- name: Upload Linux .deb ARM64 Release
uses: actions/upload-release-asset@v1
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64')
Expand All @@ -195,7 +195,7 @@ jobs:
asset_name: freetube_${{ env.PACKAGE_VERSION }}_amd64.rpm
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.x86_64.rpm
asset_content_type: application/x-rpm

# rpm are not built for armv7l

- name: Upload Linux .rpm ARM64 Release
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.7z
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-win.7z
asset_content_type: application/x-7z-compressed

- name: Upload Windows x64 portable Release
uses: actions/upload-release-asset@v1
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
Expand All @@ -296,7 +296,7 @@ jobs:
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.exe
asset_path: build/FreeTube ${{ env.PACKAGE_VERSION }}.exe
asset_content_type: application/x-ms-dos-executable

- name: Upload Mac x64 .dmg Release
uses: actions/upload-release-asset@v1
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
Expand All @@ -318,7 +318,7 @@ jobs:
# asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.dmg
# asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64.dmg
# asset_content_type: application/x-apple-diskimage

- name: Upload Mac x64 .zip Release
uses: actions/upload-release-asset@v1
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
Expand Down Expand Up @@ -351,4 +351,4 @@ jobs:
# asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.zip
# asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-mac.zip
# asset_content_type: application/x-apple-diskimage

4 changes: 3 additions & 1 deletion _scripts/webpack.renderer.browser.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path')
const fs = require('fs')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
Expand Down Expand Up @@ -167,7 +168,8 @@ if (isDevMode) {
config.plugins.push(
processLocalesPlugin,
new webpack.DefinePlugin({
'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames)
'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames),
'process.env.GEOLOCATION_NAMES': JSON.stringify(fs.readdirSync(path.join(__dirname, '..', 'static', 'geolocations')))
}),
new CopyWebpackPlugin({
patterns: [
Expand Down
4 changes: 3 additions & 1 deletion _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path')
const fs = require('fs')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
Expand Down Expand Up @@ -170,7 +171,8 @@ const processLocalesPlugin = new ProcessLocalesPlugin({
config.plugins.push(
processLocalesPlugin,
new webpack.DefinePlugin({
'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames)
'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames),
'process.env.GEOLOCATION_NAMES': JSON.stringify(fs.readdirSync(path.join(__dirname, '..', 'static', 'geolocations')))
}),
new CopyWebpackPlugin({
patterns: [
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@
"pack:renderer": "webpack --mode=production --node-env=production --config _scripts/webpack.renderer.config.js",
"pack:web": "webpack --mode=production --node-env=production --config _scripts/webpack.web.config.js",
"pack:workers": "webpack --mode=production --node-env=production --config _scripts/webpack.workers.config.js",
"postinstall": "npm run rebuild:electron",
"postinstall": "yarn run --silent rebuild:electron",
"prettier": "prettier --write \"{src,_scripts}/**/*.{js,vue}\"",
"rebuild:electron": "electron-builder install-app-deps",
"rebuild:node": "npm rebuild",
"release": "run-s test build",
"ci": "yarn install --frozen-lockfile"
"ci": "yarn install --silent --frozen-lockfile"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.2.0",
Expand Down
14 changes: 7 additions & 7 deletions src/renderer/components/ft-list-video/ft-list-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import Vue from 'vue'
import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
import { mapActions } from 'vuex'
import i18n from '../../i18n/index'
import { copyToClipboard, openExternalLink, showToast } from '../../helpers/utils'
import {
copyToClipboard,
openExternalLink,
showToast,
toLocalePublicationString
} from '../../helpers/utils'

export default Vue.extend({
name: 'FtListVideo',
Expand Down Expand Up @@ -392,15 +397,11 @@ export default Vue.extend({

if (typeof (this.data.publishedText) !== 'undefined' && this.data.publishedText !== null && !this.isLive) {
// produces a string according to the template in the locales string
this.toLocalePublicationString({
this.uploadedTime = toLocalePublicationString({
publishText: this.publishedText,
isLive: this.isLive,
isUpcoming: this.isUpcoming,
isRSS: this.data.isRSS
}).then((data) => {
this.uploadedTime = data
}).catch((error) => {
console.error(error)
})
}

Expand Down Expand Up @@ -503,7 +504,6 @@ export default Vue.extend({
},

...mapActions([
'toLocalePublicationString',
'openInExternalPlayer',
'updateHistory',
'removeFromHistory',
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/components/side-nav/side-nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
.navOption .navLabel {
margin-left: 40px;
overflow: hidden;
margin-left: 40px;
word-break: break-word;
}

Expand All @@ -90,13 +89,15 @@
}

.channelLink {
display: block;
color: inherit;
text-decoration: inherit;
}

.channelThumbnail {
border-radius: 50%;
width: 35px;
vertical-align: middle;
}

.closed {
Expand Down
3 changes: 0 additions & 3 deletions src/renderer/components/side-nav/side-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ export default Vue.extend({
methods: {
navigate: function (route) {
this.$router.push('/' + route)
},
goToChannel: function (id) {
this.$router.push({ path: `/channel/${id}` })
}
}
})
Loading

0 comments on commit ad945bd

Please sign in to comment.