Skip to content

Commit c490d3b

Browse files
**Release 116**
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
2 parents 7890f6f + 7048a90 commit c490d3b

File tree

15 files changed

+127
-193
lines changed

15 files changed

+127
-193
lines changed

.github/workflows/buildCordova.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: Build Cordova
4+
name: Build Android
55

66
on:
77
push:
@@ -22,6 +22,11 @@ jobs:
2222
- name: 🧶 Yarn install
2323
run: yarn ci
2424

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

README.md

+14-20
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,24 @@ An open source YouTube player built with privacy in mind.
2121
<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>
2222
<hr>
2323

24-
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.
25-
Available for Android and as a PWA. FreeTube Cordova is a fork of [FreeTube](https://www.github.com/FreeTubeApp).
26-
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.
24+
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.
25+
Available as an APK and as a PWA (progressive web app). FreeTube Android is a fork of [FreeTube](https://www.github.com/FreeTubeApp).
26+
27+
> [!NOTE]
28+
> 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.
29+
2730
<p align='center'>
2831
<a href='https://apt.izzysoft.de/fdroid/index/apk/io.freetubeapp.freetube'>
2932
<img height='100' alt='Get it on IzzyOnDroid' src='https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png'>
3033
</a>
3134
</p>
3235

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

3538
<hr>
3639

3740
## How does it work?
38-
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.
41+
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.
3942

4043
## Features
4144
* Watch videos without ads
@@ -50,8 +53,6 @@ FreeTube Cordova uses the [Invidious API](https://github.com/iv-org/invidious) t
5053
* Most popular videos page based on the set Invidious instance
5154
* SponsorBlock
5255
* Full Theme support
53-
* Multiple windows
54-
* Mini Player (Picture-in-Picture)
5556
* Keyboard shortcuts
5657
* Option to show only family friendly content
5758
* Show/hide functionality or elements within the app using the distraction free settings
@@ -61,30 +62,23 @@ Go to [FreeTube's Documentation](https://docs.freetubeapp.io/) if you'd like to
6162
## Screenshots
6263
<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>
6364

64-
## How to install
65-
66-
There is a deployed PWA (progressive web app) available here:
67-
68-
[https://marmadilemanteater.github.io/freetube/#/](https://marmadilemanteater.github.io/freetube/#/)
69-
70-
There is an APK which can be downloaded here:
71-
72-
[https://github.com/MarmadileManteater/FreeTubeCordova/releases](https://github.com/MarmadileManteater/FreeTubeCordova/releases)
7365

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

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

7971
## How to build and test
80-
### Commands for the Android APK
72+
### Commands for the APK
8173
```bash
8274
# 📦 Packs the project using `webpack.android.config.js`
8375
yarn pack:android
8476
# 🚧 for development
8577
yarn pack:android:dev
8678
```
87-
### Commands for the PWA (progressive web app)
79+
> [!NOTE]
80+
> 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`.
81+
### Commands for the PWA
8882
```bash
8983
# 🐛 Debugs the project using `webpack.web.config.js`
9084
yarn dev:web
@@ -126,13 +120,13 @@ before sending your pull request.
126120
<img src="https://hosted.weblate.org/widgets/free-tube/-/287x66-grey.png" alt="Translation status" />
127121
</a>
128122

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

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

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

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

_scripts/CordovaPlugin.js

-50
This file was deleted.

_scripts/_setAppSplashTheme.mjs

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
import { readFile, writeFile } from 'fs/promises'
3+
import { join } from 'path'
4+
import { fileURLToPath } from 'url'
5+
6+
7+
// sets the splashscreen & icon to one of three predefined themes (this makes it easier to tell, at a glance, which one is open)
8+
// - release (the default production look)
9+
// - nightly
10+
// OR
11+
// - development
12+
13+
const COLOURS = {
14+
RELEASE: {
15+
primary: '#f04242',
16+
secondary: '#14a4df',
17+
back: '#E4E4E4',
18+
backDark: '#212121'
19+
},
20+
// catppucin mocha theme colours
21+
NIGHTLY: {
22+
primary: '#cdd6f4',
23+
secondary: '#cdd6f4',
24+
back: '#1e1e2e',
25+
backDark: '#1e1e2e'
26+
},
27+
// inverted release colours
28+
DEVELOPMENT: {
29+
primary: '#E4E4E4',
30+
secondary: '#E4E4E4',
31+
back: '#f04242',
32+
backDark: '#f04242'
33+
}
34+
}
35+
let colour = 'RELEASE'
36+
for (const key in COLOURS) {
37+
if (process.argv.indexOf(`--${key.toLowerCase()}`) !== -1) {
38+
colour = key
39+
}
40+
}
41+
42+
const currentTheme = COLOURS[colour]
43+
44+
const scriptDir = fileURLToPath(import.meta.url)
45+
const drawablePath = join(scriptDir, '../../android/app/src/main/res/drawable/')
46+
47+
const foreground = join(drawablePath, 'ic_launcher_foreground.xml')
48+
let foregroundXML = (await readFile(foreground)).toString()
49+
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`)
50+
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`)
51+
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`)
52+
await writeFile(foreground, foregroundXML)
53+
54+
const background = join(drawablePath, 'ic_launcher_background.xml')
55+
let backgroundXML = (await readFile(background)).toString()
56+
backgroundXML = backgroundXML.replace(/android:fillColor="[^"]*?" \/>/g, `android:fillColor="${currentTheme.back}" />`)
57+
await writeFile(background, backgroundXML)
58+
59+
const lightTheme = join(scriptDir, '..', '..', 'android/app/src/main/res/values-v31/themes.xml')
60+
let lightThemeXml = (await readFile(lightTheme)).toString()
61+
lightThemeXml = lightThemeXml.replace(/<item name="android:windowSplashScreenBackground">[^"]*?<\/item>/g, `<item name="android:windowSplashScreenBackground">${currentTheme.back}</item>`)
62+
lightThemeXml = lightThemeXml.replace(/<item name="android:windowSplashScreenIconBackgroundColor">[^"]*?<\/item>/g, `<item name="android:windowSplashScreenIconBackgroundColor">${currentTheme.back}</item>`)
63+
await writeFile(lightTheme, lightThemeXml)
64+
65+
const darkTheme = join(scriptDir, '..', '..', 'android/app/src/main/res/values-night-v31/themes.xml')
66+
let darkThemeXml = (await readFile(darkTheme)).toString()
67+
darkThemeXml = darkThemeXml.replace(/<item name="android:windowSplashScreenBackground">[^"]*?<\/item>/g, `<item name="android:windowSplashScreenBackground">${currentTheme.backDark}</item>`)
68+
darkThemeXml = darkThemeXml.replace(/<item name="android:windowSplashScreenIconBackgroundColor">[^"]*?<\/item>/g, `<item name="android:windowSplashScreenIconBackgroundColor">${currentTheme.backDark}</item>`)
69+
await writeFile(darkTheme, darkThemeXml)

_scripts/cordova-build.js

-60
This file was deleted.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<style name="Base.Theme.FreeTubeAndroid" parent="Theme.Material3.DayNight.NoActionBar">
5+
<!-- Customize your dark theme here. -->
6+
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
7+
<item name="android:windowSplashScreenBackground">#212121</item>
8+
<item name="android:windowSplashScreenIconBackgroundColor">#212121</item>
9+
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
10+
</style>
11+
</resources>

android/app/src/main/res/values-v23/themes.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<style name="Theme.FreeTubeAndroid" parent="Base.Theme.FreeTubeAndroid">
44
<!-- Transparent system bars for edge-to-edge. -->
5-
<item name="android:navigationBarColor">@android:color/transparent</item>
6-
<item name="android:statusBarColor">@android:color/transparent</item>
7-
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
5+
<item name="android:navigationBarColor">@android:color/background_dark</item>
6+
<item name="android:statusBarColor">@android:color/background_dark</item>
7+
<item name="android:windowLightStatusBar">false</item>
88
</style>
9-
</resources>
9+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<style name="Base.Theme.FreeTubeAndroid" parent="Theme.Material3.DayNight.NoActionBar">
5+
<!-- Customize your light theme here. -->
6+
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
7+
<item name="android:windowSplashScreenBackground">#E4E4E4</item>
8+
<item name="android:windowSplashScreenIconBackgroundColor">#E4E4E4</item>
9+
</style>
10+
</resources>

metadata/en-US/full_description.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FreeTube Cordova is a YouTube client that uses the Invidious API to serve data and videos from YouTube.
1+
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.
22
No official YouTube APIs are used to obtain data.
33
Your subscriptions and history are stored locally on your device and are never sent out.
44

@@ -15,4 +15,4 @@ Features:
1515
- Parental controls
1616
- Subscribe to channels without an account
1717

18-
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.
18+
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.

metadata/en-US/title.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FreeTubeCordova
1+
FreeTube Android

src/renderer/components/cordova-settings/cordova-settings.js

-26
This file was deleted.

src/renderer/components/cordova-settings/cordova-settings.vue

-24
This file was deleted.

0 commit comments

Comments
 (0)