Merge pull request #1231 from Materialious/update/1.12.2
Reactively set theme color
This commit is contained in:
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "us.materialio.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 173
|
||||
versionName "1.12.1"
|
||||
versionCode 174
|
||||
versionName "1.12.2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -70,7 +70,11 @@
|
||||
|
||||
|
||||
|
||||
<release version="1.12.1" date="2025-12-08">
|
||||
|
||||
<release version="1.12.2" date="2025-12-08">
|
||||
<url>https://github.com/Materialious/Materialious/releases/tag/1.12.2</url>
|
||||
</release>
|
||||
<release version="1.12.1" date="2025-12-08">
|
||||
<url>https://github.com/Materialious/Materialious/releases/tag/1.12.1</url>
|
||||
</release>
|
||||
<release version="1.12.0" date="2025-12-05">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Materialious",
|
||||
"version": "1.12.1",
|
||||
"version": "1.12.2",
|
||||
"description": "Modern material design for Invidious.",
|
||||
"author": {
|
||||
"name": "Ward Pearce",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.12.1",
|
||||
"version": "1.12.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
async function setColor(color: any) {
|
||||
const target = color.target;
|
||||
const hex = (target as { value: string }).value;
|
||||
await ui('theme', hex);
|
||||
setAmoledTheme();
|
||||
themeColorStore.set(hex);
|
||||
}
|
||||
|
||||
@@ -197,21 +197,22 @@
|
||||
notifications = feed.notifications;
|
||||
}
|
||||
|
||||
themeColorStore.subscribe(async (hex) => {
|
||||
if (!hex) return;
|
||||
await ui('theme', hex);
|
||||
});
|
||||
|
||||
onMount(async () => {
|
||||
ui();
|
||||
|
||||
let themeHex = get(themeColorStore);
|
||||
if (themeHex) {
|
||||
await ui('theme', themeHex);
|
||||
} else if (Capacitor.getPlatform() === 'android') {
|
||||
if (!themeHex) {
|
||||
try {
|
||||
const colorPalette = await colorTheme.getColorPalette();
|
||||
themeHex = convertToHexColorCode(colorPalette.primary);
|
||||
await ui('theme', themeHex);
|
||||
} catch {
|
||||
// Continue regardless of error
|
||||
}
|
||||
if (Capacitor.getPlatform() === 'android' && !themeHex) {
|
||||
try {
|
||||
const colorPalette = await colorTheme.getColorPalette();
|
||||
themeHex = convertToHexColorCode(colorPalette.primary);
|
||||
await ui('theme', themeHex);
|
||||
} catch {
|
||||
// Continue regardless of error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import os
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
LATEST_VERSION = "1.12.1"
|
||||
LATEST_VERSION = "1.12.2"
|
||||
RELEASE_DATE = datetime.now().strftime("%Y-%-m-%d") # Format: YYYY-M-D
|
||||
|
||||
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
|
||||
|
||||
Reference in New Issue
Block a user