Skip to content

Commit

Permalink
**Release 116**
Browse files Browse the repository at this point in the history
APK changes:

- Fixed locales other than `en-US` not loading (7048a90)
- Fixed system UI holding onto light theme after changing from light mode to dark mode (9f00682)
- Added proper dark and light splashscreens (4d82e52)

  ...

  **Full Changelog**: 0.20.0.115...0.20.0.116
  • Loading branch information
MarmadileManteater committed Apr 9, 2024
2 parents 7890f6f + 7048a90 commit c490d3b
Show file tree
Hide file tree
Showing 15 changed files with 127 additions and 193 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/buildCordova.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build Cordova
name: Build Android

on:
push:
Expand All @@ -22,6 +22,11 @@ jobs:
- name: 🧶 Yarn install
run: yarn ci

- name: Set environment icon & splash for android app
run: |
# to make it easier to tell which is which when multiple are installed
node ./_scripts/_setAppSplashTheme.mjs --nightly
- name: 🔍Lint code
run: yarn lint

Expand Down
34 changes: 14 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,24 @@ An open source YouTube player built with privacy in mind.
<p align="center"><a href="https://freetubeapp.io/">Website</a> &bull; <a href="https://blog.freetubeapp.io/">Blog</a> &bull; <a href="https://docs.freetubeapp.io/">Documentation</a> &bull; <a href="https://docs.freetubeapp.io/faq/">FAQ</a> &bull; <a href="https://github.com/FreeTubeApp/FreeTube/discussions">Discussions</a></p>
<hr>

FreeTube Cordova is an open source YouTube player built with privacy in mind. Use YouTube without advertisements and prevent Google from tracking you with their cookies and JavaScript.
Available for Android and as a PWA. FreeTube Cordova is a fork of [FreeTube](https://www.github.com/FreeTubeApp).
FreeTube Cordova is currently in Beta. While it should work well for most users, there are still bugs and missing features that need to be addressed.
FreeTube Android is an open source YouTube player built with privacy in mind. Use YouTube without advertisements and prevent Google from tracking you with their cookies and JavaScript.
Available as an APK and as a PWA (progressive web app). FreeTube Android is a fork of [FreeTube](https://www.github.com/FreeTubeApp).

> [!NOTE]
> FreeTube Android is currently in Beta. While it should work well for most users, there are still bugs and missing features that need to be addressed.
<p align='center'>
<a href='https://apt.izzysoft.de/fdroid/index/apk/io.freetubeapp.freetube'>
<img height='100' alt='Get it on IzzyOnDroid' src='https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png'>
</a>
</p>

<p align="center"><a href="https://github.com/MarmadileManteater/FreeTubeCordova/releases">Download FreeTubeCordova</a></p>
<p align="center"><a href="https://github.com/MarmadileManteater/FreeTubeCordova/releases">Download FreeTube Android</a></p>

<hr>

## How does it work?
FreeTube Cordova uses the [Invidious API](https://github.com/iv-org/invidious) to serve data and videos. No official YouTube APIs are used to obtain data. Your subscriptions and history are stored locally on your device and are never sent out.
The APK uses a built in extractor to grab and serve data / videos, and can optionally use the [Invidious API](https://github.com/iv-org/invidious). The PWA *only* uses the Invidious API. No official YouTube APIs are used to obtain data. Your subscriptions and history are stored locally on your device and are never sent out.

## Features
* Watch videos without ads
Expand All @@ -50,8 +53,6 @@ FreeTube Cordova uses the [Invidious API](https://github.com/iv-org/invidious) t
* Most popular videos page based on the set Invidious instance
* SponsorBlock
* Full Theme support
* Multiple windows
* Mini Player (Picture-in-Picture)
* Keyboard shortcuts
* Option to show only family friendly content
* Show/hide functionality or elements within the app using the distraction free settings
Expand All @@ -61,30 +62,23 @@ Go to [FreeTube's Documentation](https://docs.freetubeapp.io/) if you'd like to
## Screenshots
<img alt="watching video" src="./metadata/en-US/images/phoneScreenshots/1.png" width=300> <img alt="trending videos" src="./metadata/en-US/images/phoneScreenshots/2.png" width=300> <img alt="subscription feed" src="./metadata/en-US/images/phoneScreenshots/3.png" width=300>

## How to install

There is a deployed PWA (progressive web app) available here:

[https://marmadilemanteater.github.io/freetube/#/](https://marmadilemanteater.github.io/freetube/#/)

There is an APK which can be downloaded here:

[https://github.com/MarmadileManteater/FreeTubeCordova/releases](https://github.com/MarmadileManteater/FreeTubeCordova/releases)

### Automated Builds (Nightly / Weekly)
Builds are automatically created from changes to our development branch via [GitHub Actions](https://github.com/MarmadileManteater/FreeTubeCordova/actions/workflows/buildCordova.yml).

The first build with a green check mark is the latest build. You will need to have a GitHub account to download these builds.

## How to build and test
### Commands for the Android APK
### Commands for the APK
```bash
# 📦 Packs the project using `webpack.android.config.js`
yarn pack:android
# 🚧 for development
yarn pack:android:dev
```
### Commands for the PWA (progressive web app)
> [!NOTE]
> These commands only build the assets necessary for the project located in `android/` to be built. In order to obtain a complete build, you will need to build the project located in `android/` with `gradle`.
### Commands for the PWA
```bash
# 🐛 Debugs the project using `webpack.web.config.js`
yarn dev:web
Expand Down Expand Up @@ -126,13 +120,13 @@ before sending your pull request.
<img src="https://hosted.weblate.org/widgets/free-tube/-/287x66-grey.png" alt="Translation status" />
</a>

If you'd like to localize FreeTubeCordova, please send submissions to [FreeTube's weblate](https://hosted.weblate.org/engage/free-tube/).
If you'd like to localize FreeTube Android, please send submissions to [FreeTube's weblate](https://hosted.weblate.org/engage/free-tube/).

## Contact
If you ever have any questions, feel free to make an issue here on GitHub.

## Upstream Donations
If you enjoy using FreeTubeCordova, you're welcome to leave a donation using the following methods to support upstream development and maintenance.
If you enjoy using FreeTube Android, you're welcome to leave a donation using the following methods to support upstream development and maintenance.

* [FreeTube on Liberapay](https://liberapay.com/FreeTube)

Expand Down
50 changes: 0 additions & 50 deletions _scripts/CordovaPlugin.js

This file was deleted.

69 changes: 69 additions & 0 deletions _scripts/_setAppSplashTheme.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

import { readFile, writeFile } from 'fs/promises'
import { join } from 'path'
import { fileURLToPath } from 'url'


// sets the splashscreen & icon to one of three predefined themes (this makes it easier to tell, at a glance, which one is open)
// - release (the default production look)
// - nightly
// OR
// - development

const COLOURS = {
RELEASE: {
primary: '#f04242',
secondary: '#14a4df',
back: '#E4E4E4',
backDark: '#212121'
},
// catppucin mocha theme colours
NIGHTLY: {
primary: '#cdd6f4',
secondary: '#cdd6f4',
back: '#1e1e2e',
backDark: '#1e1e2e'
},
// inverted release colours
DEVELOPMENT: {
primary: '#E4E4E4',
secondary: '#E4E4E4',
back: '#f04242',
backDark: '#f04242'
}
}
let colour = 'RELEASE'
for (const key in COLOURS) {
if (process.argv.indexOf(`--${key.toLowerCase()}`) !== -1) {
colour = key
}
}

const currentTheme = COLOURS[colour]

const scriptDir = fileURLToPath(import.meta.url)
const drawablePath = join(scriptDir, '../../android/app/src/main/res/drawable/')

const foreground = join(drawablePath, 'ic_launcher_foreground.xml')
let foregroundXML = (await readFile(foreground)).toString()
foregroundXML = foregroundXML.replace(/<path android:fillColor="[^"]*?" android:strokeWidth="0\.784519" android:pathData="M 27/g, `<path android:fillColor="${currentTheme.primary}" android:strokeWidth="0.784519" android:pathData="M 27`)
foregroundXML = foregroundXML.replace(/<path android:fillColor="[^"]*?" android:strokeWidth="0\.784519" android:pathData="M 18/g, `<path android:fillColor="${currentTheme.primary}" android:strokeWidth="0.784519" android:pathData="M 18`)
foregroundXML = foregroundXML.replace(/<path android:fillColor="[^"]*?" android:strokeWidth="0\.784519" android:pathData="M 28/g, `<path android:fillColor="${currentTheme.secondary}" android:strokeWidth="0.784519" android:pathData="M 28`)
await writeFile(foreground, foregroundXML)

const background = join(drawablePath, 'ic_launcher_background.xml')
let backgroundXML = (await readFile(background)).toString()
backgroundXML = backgroundXML.replace(/android:fillColor="[^"]*?" \/>/g, `android:fillColor="${currentTheme.back}" />`)
await writeFile(background, backgroundXML)

const lightTheme = join(scriptDir, '..', '..', 'android/app/src/main/res/values-v31/themes.xml')
let lightThemeXml = (await readFile(lightTheme)).toString()
lightThemeXml = lightThemeXml.replace(/<item name="android:windowSplashScreenBackground">[^"]*?<\/item>/g, `<item name="android:windowSplashScreenBackground">${currentTheme.back}</item>`)
lightThemeXml = lightThemeXml.replace(/<item name="android:windowSplashScreenIconBackgroundColor">[^"]*?<\/item>/g, `<item name="android:windowSplashScreenIconBackgroundColor">${currentTheme.back}</item>`)
await writeFile(lightTheme, lightThemeXml)

const darkTheme = join(scriptDir, '..', '..', 'android/app/src/main/res/values-night-v31/themes.xml')
let darkThemeXml = (await readFile(darkTheme)).toString()
darkThemeXml = darkThemeXml.replace(/<item name="android:windowSplashScreenBackground">[^"]*?<\/item>/g, `<item name="android:windowSplashScreenBackground">${currentTheme.backDark}</item>`)
darkThemeXml = darkThemeXml.replace(/<item name="android:windowSplashScreenIconBackgroundColor">[^"]*?<\/item>/g, `<item name="android:windowSplashScreenIconBackgroundColor">${currentTheme.backDark}</item>`)
await writeFile(darkTheme, darkThemeXml)
60 changes: 0 additions & 60 deletions _scripts/cordova-build.js

This file was deleted.

File renamed without changes.
11 changes: 11 additions & 0 deletions android/app/src/main/res/values-night-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Base.Theme.FreeTubeAndroid" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
<item name="android:windowSplashScreenBackground">#212121</item>
<item name="android:windowSplashScreenIconBackgroundColor">#212121</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
</style>
</resources>
8 changes: 4 additions & 4 deletions android/app/src/main/res/values-v23/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<style name="Theme.FreeTubeAndroid" parent="Base.Theme.FreeTubeAndroid">
<!-- Transparent system bars for edge-to-edge. -->
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
<item name="android:navigationBarColor">@android:color/background_dark</item>
<item name="android:statusBarColor">@android:color/background_dark</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>
</resources>
10 changes: 10 additions & 0 deletions android/app/src/main/res/values-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Base.Theme.FreeTubeAndroid" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
<item name="android:windowSplashScreenBackground">#E4E4E4</item>
<item name="android:windowSplashScreenIconBackgroundColor">#E4E4E4</item>
</style>
</resources>
4 changes: 2 additions & 2 deletions metadata/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FreeTube Cordova is a YouTube client that uses the Invidious API to serve data and videos from YouTube.
FreeTube Android (formerly FreeTubeCordova) is a YouTube client that uses uses a built in extractor to grab and serve data / videos from YouTube. The Invidious API can also be optionally used.
No official YouTube APIs are used to obtain data.
Your subscriptions and history are stored locally on your device and are never sent out.

Expand All @@ -15,4 +15,4 @@ Features:
- Parental controls
- Subscribe to channels without an account

FreeTube Cordova is currently in Beta. While it should work well for most users, there are still bugs and missing features that need to be addressed.
FreeTube Android is currently in Beta. While it should work well for most users, there are still bugs and missing features that need to be addressed.
2 changes: 1 addition & 1 deletion metadata/en-US/title.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FreeTubeCordova
FreeTube Android
26 changes: 0 additions & 26 deletions src/renderer/components/cordova-settings/cordova-settings.js

This file was deleted.

24 changes: 0 additions & 24 deletions src/renderer/components/cordova-settings/cordova-settings.vue

This file was deleted.

Loading

0 comments on commit c490d3b

Please sign in to comment.