feat: add Nothing Phone compatible monochrome themed icon & default server seed (v1.1.3)
Build & Release Android APK / Build & Publish Release APK (push) Waiting to run
Build & Release Android APK / Build & Publish Release APK (push) Waiting to run
This commit is contained in:
@@ -91,6 +91,25 @@ class MainActivity : FragmentActivity() {
|
||||
enableEdgeToEdge()
|
||||
|
||||
repository = DeviceRepository(SharedPrefsStorage(applicationContext))
|
||||
val settingsPrefs = getSharedPreferences("app_settings_prefs", Context.MODE_PRIVATE)
|
||||
val hasSeeded = settingsPrefs.getBoolean("has_seeded_default_device", false)
|
||||
if (!hasSeeded) {
|
||||
settingsPrefs.edit().putBoolean("has_seeded_default_device", true).apply()
|
||||
if (repository.getDevices().isEmpty()) {
|
||||
val defaultDevice = DeviceConfig(
|
||||
id = "2dc98ae9-9f71-4f29-95a6-a59ac94d7bf6",
|
||||
name = "Server",
|
||||
node = "debian",
|
||||
powerOffUrl = "https://cosmos.linuxguy.space/poweroff?node=debian",
|
||||
powerOnUrl = "https://trigger.macrodroid.com/87f2f62c-09ee-43cb-8796-fd1a6465754b/wakeserver",
|
||||
r2Url = "https://bucket.linuxguy.space/home-server-app/endpoints.json",
|
||||
rebootUrl = "https://cosmos.linuxguy.space/reboot?node=debian",
|
||||
secretKey = "Carbon@12",
|
||||
statusUrl = "https://cosmos.linuxguy.space/status?node=debian"
|
||||
)
|
||||
repository.addDevice(defaultDevice)
|
||||
}
|
||||
}
|
||||
triggerClient = TriggerClient()
|
||||
appSettings = AppSettings(applicationContext)
|
||||
historyRepository = TriggerHistoryRepository(applicationContext)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group
|
||||
android:translateX="27.6"
|
||||
android:translateY="27.6"
|
||||
android:scaleX="2.2"
|
||||
android:scaleY="2.2">
|
||||
<path
|
||||
android:fillColor="#22C55E"
|
||||
android:pathData="M20,4H4C2.89,4 2,4.9 2,6v12c0,1.1 0.89,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM20,18H4V8h16V18zM6.5,16.5l3.5,-3.5L6.5,9.5L7.91,8.09L12.83,13l-4.92,4.91L6.5,16.5zM12,15h5v2h-5V15z"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group
|
||||
android:translateX="27.6"
|
||||
android:translateY="27.6"
|
||||
android:scaleX="2.2"
|
||||
android:scaleY="2.2">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M20,4H4C2.89,4 2,4.9 2,6v12c0,1.1 0.89,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM20,18H4V8h16V18zM6.5,16.5l3.5,-3.5L6.5,9.5L7.91,8.09L12.83,13l-4.92,4.91L6.5,16.5zM12,15h5v2h-5V15z"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -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="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
|
||||
</adaptive-icon>
|
||||
@@ -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="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#0B0F19</color>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user