Skip to content

Commit

Permalink
Edited the information available in the About page
Browse files Browse the repository at this point in the history
This is an automated nightly publish.
  • Loading branch information
MarmadileManteater committed Aug 14, 2022
2 parents 49df7f4 + ab03be0 commit 9cb0970
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 31 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/buildCordova.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Build Cordova

on:
push:
branches: [ development, '**-RC' ]
branches: [ development ]

jobs:
build:
Expand Down Expand Up @@ -42,23 +42,12 @@ jobs:
id: versionNumber
uses: actions/github-script@v3
env:
IS_DEV: ${{ contains(github.ref, 'development') }}
IS_RC: ${{ contains(github.ref, 'release') }}
VERSION_NUMBER_NIGHTLY: ${{ env.PACKAGE_VERSION }}-development-${{ github.run_number }}
VERSION_NUMBER_RC: ${{ env.PACKAGE_VERSION }}-nightly-${{ github.run_number }}
VERSION_NUMBER: ${{ env.PACKAGE_VERSION }}
VERSION_NUMBER_DEVELOPMENT: ${{ env.PACKAGE_VERSION }}-development-${{ github.run_number }}
with:
result-encoding: string
script: |
if (${{ env.IS_DEV }}) {
return "${{ env.VERSION_NUMBER_NIGHTLY }}"
} else if (${{ env.IS_RC }}) {
return "${{ env.VERSION_NUMBER_RC }}"
} else {
return "${{env.VERSION_NUMBER }}"
}
# script: if ${{ env.IS_DEV }} then echo ":token :set-output name=VERSION_NUMBER::${{ env.VERSION_NUMBER_NIGHTLY }}" else echo "::set-output name=VERSION_NUMBER::${{ env.VERSION_NUMBER }}" fi

return "${{ env.VERSION_NUMBER_DEVELOPMENT }}"
- name: Update package.json version
uses: jossef/action-set-json-field@v1
with:
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/releaseCordova.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Release Cordova
on:
push:
branches: [ release, '**-RC' ]
branches: [ release ]

jobs:
build:
Expand Down Expand Up @@ -37,20 +37,20 @@ jobs:
id: versionNumber
uses: actions/github-script@v3
env:
IS_DEV: ${{ contains(github.ref, 'master') }}
IS_RC: ${{ contains(github.ref, 'release') }}
VERSION_NUMBER_NIGHTLY: ${{ env.PACKAGE_VERSION }}-development-${{ github.run_number }}
VERSION_NUMBER_RC: ${{ env.PACKAGE_VERSION }}-nightly-${{ github.run_number }}
VERSION_NUMBER: ${{ env.PACKAGE_VERSION }}
IS_DEV: ${{ contains(github.ref, 'development') }}
IS_NIGHTLY: ${{ contains(github.ref, 'release') }}
VERSION_NUMBER_DEVELOPMENT: ${{ env.PACKAGE_VERSION }}-development-${{ github.run_number }}
VERSION_NUMBER_NIGHTLY: ${{ env.PACKAGE_VERSION }}-nightly-${{ github.run_number }}
VERSION_NUMBER_RELEASE: ${{ env.PACKAGE_VERSION }}-unofficial
with:
result-encoding: string
script: |
if (${{ env.IS_DEV }}) {
return "${{ env.VERSION_NUMBER_DEVELOPMENT }}"
} else if (${{ env.IS_NIGHTLY }}) {
return "${{ env.VERSION_NUMBER_NIGHTLY }}"
} else if (${{ env.IS_RC }}) {
return "${{ env.VERSION_NUMBER_RC }}"
} else {
return "${{env.VERSION_NUMBER }}"
return "${{env.VERSION_NUMBER_RELEASE }}"
}
# script: if ${{ env.IS_DEV }} then echo ":token :set-output name=VERSION_NUMBER::${{ env.VERSION_NUMBER_NIGHTLY }}" else echo "::set-output name=VERSION_NUMBER::${{ env.VERSION_NUMBER }}" fi

Expand Down Expand Up @@ -116,6 +116,11 @@ jobs:
name: freetube-${{ steps.versionNumber.outputs.result }}.zip
path: build/freetube/freetube-${{ steps.versionNumber.outputs.result }}.zip

- name: Create release body
run: |
echo "Latest Commit Message: ${{ github.event.head_commit.message }}" >> release.txt
echo "" >> release.txt
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -126,6 +131,7 @@ jobs:
release_name: ${{ steps.versionNumber.outputs.result }}
draft: true
prerelease: false
body_path: release.txt

- name: Upload HTML5 Artifact to Release
uses: actions/upload-release-asset@v1.0.1
Expand All @@ -137,7 +143,6 @@ jobs:
asset_name: freetube-${{ steps.versionNumber.outputs.result }}-HTML5.zip
asset_content_type: application/zip


- name: Upload Android APK Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
Expand Down
29 changes: 27 additions & 2 deletions _scripts/cordova-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const archiver = require('archiver');
await addCordovaPlugin('cordova-plugin-media')
await addCordovaPlugin('https://github.com/ghenry22/cordova-plugin-music-controls2.git')
await addCordovaPlugin('cordova-plugin-android-permissions')
await addCordovaPlugin('cordova-clipboard')

await addNpmPackage('browserify')
await addNpmPackage('https://github.com/jvilk/BrowserFS.git')
Expand Down Expand Up @@ -181,9 +182,13 @@ const archiver = require('archiver');
rendererContent = rendererContent.replace(/(this.showOpenDialog)\(([^\(\)]*?)\)/g, 'showFileLoadDialog($2);')
rendererContent = rendererContent.replace(/(this.showSaveDialog)\(([^\(\)]*?)\)/g, 'showFileSaveDialog($2);')
rendererContent = rendererContent.replace(/const store (= localforage.createInstance)/g, 'const store = window.dataStore $1')
rendererContent = rendererContent.replace(/{openExternalLink\({rootState:t},e\){/g, "{openExternalLink:window.openExternalLink,electronOpenExternalLink({rootState:t},e){")
rendererContent = rendererContent.replace(/navigator.clipboard.writeText\(/g, "window.copyToClipboard\(")
if (exportType === 'cordova') {
rendererContent = rendererContent.replace(/this.invidiousGetVideoInformation\(this.videoId\).then\(/g, 'this.invidiousGetVideoInformation(this.videoId).then(updatePlayingVideo);this.invidiousGetVideoInformation\(this.videoId\).then(')
rendererContent = rendererContent.replace('systemTheme:function(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}', 'systemTheme:function () { return window.isDarkMode }')
} else {
rendererContent = rendererContent.replaceAll("createNewWindow:function(){", "createNewWindow: window.createNewWindow, electronNewWindow:function(){")
}
/* eslint-enable no-useless-escape */
// This enables channel view
Expand Down Expand Up @@ -546,16 +551,36 @@ const archiver = require('archiver');
return currentVideo;
}
});
window.openExternalLink = function ({ rootState }, link) {
var a = document.createElement("a");
a.setAttribute("href", link);
a.setAttribute("target", "_blank");
a.click();
};
` + ((exportType === 'cordova')
? `
window.copyToClipboard = function (content) {
cordova.plugins.clipboard.copy(text);
};
window.isDarkMode = "light";
if (await new Promise(function (resolve, reject) { cordova.plugins.ThemeDetection.isAvailable(resolve, reject) }) ) {
var isDarkMode = await new Promise(function (resolve, reject) { cordova.plugins.ThemeDetection.isDarkModeEnabled(function (result) { resolve(result.value) },reject) });
if (isDarkMode) {
window.isDarkMode = "dark";
}
}`
: '') + `
}
var removeNewWindowIconStyle = document.createElement('style');
removeNewWindowIconStyle.innerHTML = ".navNewWindowIcon { display: none !important; }"
document.head.appendChild(removeNewWindowIconStyle);
`
: `
window.copyToClipboard = function (content) {
navigator.clipboard.writeText(content);
};
window.createNewWindow = function () {
window.open(window.location.pathname, "_blank")
};
`) + `
` + rendererContent + `
}());
`)
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ export default Vue.extend({
checkForNewUpdates: function () {
if (this.checkForUpdates) {
const { version } = require('../../package.json')
const requestUrl = 'https://api.github.com/repos/freetubeapp/freetube/releases?per_page=1'
// For future reference, this is a change that is only for this repo.
// This is never meant to be integrated back upstream, for obvious reasons.
const requestUrl = 'https://api.github.com/repos/marmadilemanteater/freetube/releases?per_page=1'

$.getJSON(requestUrl, (response) => {
const tagName = response[0].tag_name
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/components/ft-icon-button/ft-icon-button.sass
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
&.right
left: calc(50% - 10px)

@media (max-width: 600px)
left: inherit !important

.list
margin: 0
padding: 0
Expand Down
9 changes: 6 additions & 3 deletions src/renderer/views/About/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ export default Vue.extend({
{
icon: ['fab', 'github'],
title: this.$t('About.Source code'),
content: `<a href="https://github.com/FreeTubeApp/FreeTube">GitHub: FreeTubeApp/FreeTube</a><br>${this.$t('About.Licensed under the AGPLv3')} <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">${this.$t('About.View License')}</a>`
// For future reference, this is a change that is only for this repo.
content: `<a href="https://github.com/MarmadileManteater/FreeTubeCordova">GitHub: FreeTubeCordova</a><br>${this.$t('About.Licensed under the AGPLv3')} <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">${this.$t('About.View License')}</a>.<br/> This is a fork of the official <a href="https://github.com/FreeTubeApp/FreeTube">FreeTube</a> repo with modifications to work better in a browser and on phones.`
},
{
icon: 'file-download',
title: this.$t('About.Downloads / Changelog'),
content: `<a href="https://github.com/FreeTubeApp/FreeTube/releases">${this.$t('About.GitHub releases')}</a>`
// This is never meant to be integrated back upstream, for obvious reasons.
content: `<a href="https://github.com/MarmadileManteater/FreeTubeCordova/releases">${this.$t('About.GitHub releases')}</a>`
},
{
icon: 'question-circle',
Expand All @@ -34,7 +36,8 @@ export default Vue.extend({
{
icon: 'exclamation-circle',
title: this.$t('About.Report a problem'),
content: `<a href="https://github.com/FreeTubeApp/FreeTube/issues">${this.$t('About.GitHub issues')}</a><br>${this.$t('About.Please check for duplicates before posting')}`
// This is never meant to be integrated back upstream, for obvious reasons.
content: `<a href="https://github.com/MarmadileManteater/FreeTubeCordova/issues">${this.$t('About.GitHub issues')}</a><br>${this.$t('About.Please check for duplicates before posting')}`
},
{
icon: 'globe',
Expand Down

0 comments on commit 9cb0970

Please sign in to comment.