Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 894c2ffe78 | |||
| 59335dab13 |
@@ -3,7 +3,13 @@ package com.syncflow
|
|||||||
import android.app.Application
|
import android.app.Application
|
||||||
import androidx.hilt.work.HiltWorkerFactory
|
import androidx.hilt.work.HiltWorkerFactory
|
||||||
import androidx.work.Configuration
|
import androidx.work.Configuration
|
||||||
|
import com.syncflow.data.db.SyncPairDao
|
||||||
|
import com.syncflow.domain.model.ScheduleType
|
||||||
|
import com.syncflow.worker.FileWatchService
|
||||||
import dagger.hilt.android.HiltAndroidApp
|
import dagger.hilt.android.HiltAndroidApp
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@@ -11,10 +17,16 @@ import javax.inject.Inject
|
|||||||
class SyncFlowApp : Application(), Configuration.Provider {
|
class SyncFlowApp : Application(), Configuration.Provider {
|
||||||
|
|
||||||
@Inject lateinit var workerFactory: HiltWorkerFactory
|
@Inject lateinit var workerFactory: HiltWorkerFactory
|
||||||
|
@Inject lateinit var syncPairDao: SyncPairDao
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
|
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
|
||||||
|
// Start file watcher on every app launch for any existing ON_CHANGE pairs
|
||||||
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
|
val hasOnChange = syncPairDao.getEnabled().any { it.scheduleType == ScheduleType.ON_CHANGE }
|
||||||
|
if (hasOnChange) FileWatchService.start(this@SyncFlowApp)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override val workManagerConfiguration: Configuration
|
override val workManagerConfiguration: Configuration
|
||||||
|
|||||||
@@ -137,11 +137,17 @@ fun SettingsScreen(
|
|||||||
) {
|
) {
|
||||||
Column(modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
Column(modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||||
Text(
|
Text(
|
||||||
"SyncFlow v${com.syncflow.BuildConfig.VERSION_NAME} — Free, no subscription.",
|
"SyncFlow",
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
"Open source. No ads. No tracking.",
|
"Version ${com.syncflow.BuildConfig.VERSION_NAME} (build ${com.syncflow.BuildConfig.VERSION_CODE})",
|
||||||
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
|
)
|
||||||
|
Spacer(Modifier.height(2.dp))
|
||||||
|
Text(
|
||||||
|
"Free, no subscription. No ads. No tracking.",
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<gradient
|
<gradient
|
||||||
android:type="linear"
|
android:type="linear"
|
||||||
android:angle="135"
|
android:angle="135"
|
||||||
android:startColor="#4338CA"
|
android:startColor="#2E1065"
|
||||||
android:centerColor="#7C3AED"
|
android:centerColor="#6D28D9"
|
||||||
android:endColor="#0891B2"/>
|
android:endColor="#1E40AF"/>
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
@@ -3,37 +3,68 @@
|
|||||||
xmlns:aapt="http://schemas.android.com/aapt"
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
android:width="108dp"
|
android:width="108dp"
|
||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="108"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="108">
|
||||||
|
|
||||||
<!-- Soft white glow ring behind arrows -->
|
<!-- Outer soft glow ring -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M12,12m-7.5,0a7.5,7.5 0 1,0 15,0a7.5,7.5 0 1,0 -15,0"
|
android:pathData="M54,54m-44,0a44,44 0 1,0 88,0a44,44 0 1,0 -88,0"
|
||||||
android:fillColor="#22FFFFFF"/>
|
android:fillColor="#12FFFFFF"/>
|
||||||
|
|
||||||
<!-- Upload arrow — white → sky blue -->
|
<!-- Mid glow ring -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M12,4V1L8,5l4,4V6c3.31,0 6,2.69 6,6 0,1.01-0.25,1.97-0.7,2.8l1.46,1.46C19.54,15.03 20,13.57 20,12c0-4.42-3.58-8-8-8z">
|
android:pathData="M54,54m-33,0a33,33 0 1,0 66,0a33,33 0 1,0 -66,0"
|
||||||
|
android:fillColor="#18FFFFFF"/>
|
||||||
|
|
||||||
|
<!-- Inner glow ring -->
|
||||||
|
<path
|
||||||
|
android:pathData="M54,54m-21,0a21,21 0 1,0 42,0a21,21 0 1,0 -42,0"
|
||||||
|
android:fillColor="#10FFFFFF"/>
|
||||||
|
|
||||||
|
<!-- Upload arrow (top-right) — neon cyan → sky blue -->
|
||||||
|
<path android:pathData="M54,18V4.5L36,22.5l18,18V27c14.895,0 27,12.105 27,27 0,4.545-1.125,8.865-3.15,12.6l6.57,6.57C87.93,67.635 90,61.065 90,54c0-19.89-16.11-36-36-36z">
|
||||||
<aapt:attr name="android:fillColor">
|
<aapt:attr name="android:fillColor">
|
||||||
<gradient
|
<gradient android:type="linear"
|
||||||
android:type="linear"
|
android:startX="36" android:startY="4"
|
||||||
android:startX="8" android:startY="1"
|
android:endX="90" android:endY="70"
|
||||||
android:endX="20" android:endY="15"
|
android:startColor="#67E8F9"
|
||||||
android:startColor="#FFFFFF"
|
android:endColor="#38BDF8"/>
|
||||||
android:endColor="#7DD3FC"/>
|
|
||||||
</aapt:attr>
|
</aapt:attr>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<!-- Download arrow — white → violet -->
|
<!-- Download arrow (bottom-left) — hot pink → coral -->
|
||||||
<path
|
<path android:pathData="M54,81c-14.895,0-27,-12.105-27,-27 0,-4.545 1.125,-8.865 3.15,-12.6L23.58,34.83C20.07,40.365 18,46.935 18,54c0,19.89 16.11,36 36,36v13.5l18,-18-18,-18v13.5z">
|
||||||
android:pathData="M12,18c-3.31,0-6,-2.69-6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24,7.74C4.46,8.97 4,10.43 4,12c0,4.42 3.58,8 8,8v3l4,-4-4,-4v3z">
|
|
||||||
<aapt:attr name="android:fillColor">
|
<aapt:attr name="android:fillColor">
|
||||||
<gradient
|
<gradient android:type="linear"
|
||||||
android:type="linear"
|
android:startX="18" android:startY="35"
|
||||||
android:startX="4" android:startY="8"
|
android:endX="72" android:endY="103"
|
||||||
android:endX="16" android:endY="23"
|
android:startColor="#F472B6"
|
||||||
android:startColor="#FFFFFF"
|
android:endColor="#FB923C"/>
|
||||||
android:endColor="#C4B5FD"/>
|
|
||||||
</aapt:attr>
|
</aapt:attr>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
|
<!-- Center glowing orb -->
|
||||||
|
<path
|
||||||
|
android:pathData="M54,54m-7,0a7,7 0 1,0 14,0a7,7 0 1,0 -14,0"
|
||||||
|
android:fillColor="#60FFFFFF"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M54,54m-4,0a4,4 0 1,0 8,0a4,4 0 1,0 -8,0"
|
||||||
|
android:fillColor="#FFFFFF"/>
|
||||||
|
|
||||||
|
<!-- Cardinal accent sparks -->
|
||||||
|
<!-- Top — cyan -->
|
||||||
|
<path android:pathData="M54,13m-3,0a3,3 0 1,0 6,0a3,3 0 1,0 -6,0" android:fillColor="#22D3EE"/>
|
||||||
|
<!-- Right — indigo -->
|
||||||
|
<path android:pathData="M95,54m-3,0a3,3 0 1,0 6,0a3,3 0 1,0 -6,0" android:fillColor="#818CF8"/>
|
||||||
|
<!-- Bottom — pink -->
|
||||||
|
<path android:pathData="M54,95m-3,0a3,3 0 1,0 6,0a3,3 0 1,0 -6,0" android:fillColor="#F9A8D4"/>
|
||||||
|
<!-- Left — emerald -->
|
||||||
|
<path android:pathData="M13,54m-3,0a3,3 0 1,0 6,0a3,3 0 1,0 -6,0" android:fillColor="#6EE7B7"/>
|
||||||
|
|
||||||
|
<!-- Diagonal mini sparks (45°) -->
|
||||||
|
<path android:pathData="M85,23m-2,0a2,2 0 1,0 4,0a2,2 0 1,0 -4,0" android:fillColor="#A5F3FC"/>
|
||||||
|
<path android:pathData="M85,85m-2,0a2,2 0 1,0 4,0a2,2 0 1,0 -4,0" android:fillColor="#FDBA74"/>
|
||||||
|
<path android:pathData="M23,85m-2,0a2,2 0 1,0 4,0a2,2 0 1,0 -4,0" android:fillColor="#C084FC"/>
|
||||||
|
<path android:pathData="M23,23m-2,0a2,2 0 1,0 4,0a2,2 0 1,0 -4,0" android:fillColor="#86EFAC"/>
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
Binary file not shown.
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
VERSION_NAME=1.0.16
|
VERSION_NAME=1.0.18
|
||||||
VERSION_CODE=17
|
VERSION_CODE=19
|
||||||
|
|||||||
Reference in New Issue
Block a user