Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile): purple nightly icon and per-channel launcher labels

Elian Doran3635a9ebecfc
diff --git a/apps/mobile/android/app/build.gradle b/apps/mobile/android/app/build.gradle
index 08886733c6..cfbc31d4e7 100644
--- a/apps/mobile/android/app/build.gradle
+++ b/apps/mobile/android/app/build.gradle
@@ -17,7 +17,11 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode ciVersionCode
versionName ciVersionName
- manifestPlaceholders = [appName: isNightly ? "Trilium Nightly" : "Trilium Notes"]
+ manifestPlaceholders = [
+ appName: isNightly ? "Trilium Nightly" : "Trilium Notes",
+ appIcon: isNightly ? "@mipmap/ic_launcher_nightly" : "@mipmap/ic_launcher",
+ appIconRound: isNightly ? "@mipmap/ic_launcher_nightly_round" : "@mipmap/ic_launcher_round"
+ ]
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
@@ -40,6 +44,7 @@ android {
// Keeps unsigned/randomly-signed development and PR-artifact builds from
// ever conflicting with a nightly or stable install.
applicationIdSuffix ".debug"
+ manifestPlaceholders = [appName: "Trilium Debug"]
}
release {
minifyEnabled false
diff --git a/apps/mobile/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xml
index f8753a9601..d382a7bc3d 100644
--- a/apps/mobile/android/app/src/main/AndroidManifest.xml
+++ b/apps/mobile/android/app/src/main/AndroidManifest.xml
@@ -4,10 +4,10 @@
<application
android:allowBackup="true"
android:largeHeap="true"
- android:icon="@mipmap/ic_launcher"
+ android:icon="${appIcon}"
android:label="${appName}"
android:networkSecurityConfig="@xml/network_security_config"
- android:roundIcon="@mipmap/ic_launcher_round"
+ android:roundIcon="${appIconRound}"
android:supportsRtl="true"
android:theme="@style/AppTheme">
diff --git a/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_nightly.xml b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_nightly.xml
new file mode 100644
index 0000000000..398f2fb845
--- /dev/null
+++ b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_nightly.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@mipmap/ic_launcher_nightly_foreground"/>
+ <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
+</adaptive-icon>
diff --git a/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_nightly_round.xml b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_nightly_round.xml
new file mode 100644
index 0000000000..398f2fb845
--- /dev/null
+++ b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_nightly_round.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@mipmap/ic_launcher_nightly_foreground"/>
+ <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
+</adaptive-icon>
diff --git a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly.png
new file mode 100644
index 0000000000..36d1cc3feb
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly_foreground.png
new file mode 100644
index 0000000000..077664cc3a
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly_round.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly_round.png
new file mode 100644
index 0000000000..ab958febe0
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_nightly_round.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly.png
new file mode 100644
index 0000000000..ab032dac6d
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly_foreground.png
new file mode 100644
index 0000000000..315a80d01e
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly_round.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly_round.png
new file mode 100644
index 0000000000..1411d1b0bc
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_nightly_round.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly.png
new file mode 100644
index 0000000000..b1ff1ae218
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly_foreground.png
new file mode 100644
index 0000000000..5b80af018f
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly_round.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly_round.png
new file mode 100644
index 0000000000..7a8d276930
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_nightly_round.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly.png
new file mode 100644
index 0000000000..b92e094134
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly_foreground.png
new file mode 100644
index 0000000000..a04f20d4d4
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly_round.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly_round.png
new file mode 100644
index 0000000000..eb8a4b0e7b
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_nightly_round.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly.png
new file mode 100644
index 0000000000..6ed7a5185e
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly_foreground.png
new file mode 100644
index 0000000000..4cae09a372
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly_round.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly_round.png
new file mode 100644
index 0000000000..bed025b68e
Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_nightly_round.png differ