forked from FreeTubeApp/FreeTube
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
15 changed files
with
127 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
FreeTubeCordova | ||
FreeTube Android |
26 changes: 0 additions & 26 deletions
26
src/renderer/components/cordova-settings/cordova-settings.js
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/renderer/components/cordova-settings/cordova-settings.vue
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.