Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId = "com.autonion.automationcompanion"
minSdk = 24
targetSdk = 36
versionCode = 5
versionName = "1.0.6"
versionCode = 6
versionName = "1.0.7"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ internal fun ActionRow(
Surface(
shape = RoundedCornerShape(14.dp),
color = cardColor,
contentColor = LocalContentColor.current,
tonalElevation = if (checked) 2.dp else 0.dp,
modifier = Modifier
.fillMaxWidth()
Expand Down Expand Up @@ -92,7 +93,7 @@ internal fun ActionRow(
Text(
text = subtitle,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f)
color = LocalContentColor.current.copy(alpha = 0.6f)
)
}
}
Expand Down Expand Up @@ -160,6 +161,7 @@ internal fun AnimatedConfigSection(
Surface(
shape = RoundedCornerShape(12.dp),
color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.35f),
contentColor = LocalContentColor.current,
modifier = Modifier
.fillMaxWidth()
.padding(start = 8.dp, top = 6.dp, bottom = 2.dp)
Expand Down Expand Up @@ -220,7 +222,7 @@ internal fun BrightnessActionConfig(
"Brightness: ${action.level}",
style = MaterialTheme.typography.labelMedium,
fontWeight = FontWeight.Medium,
color = MaterialTheme.colorScheme.onSurface
color = LocalContentColor.current
)
Spacer(modifier = Modifier.height(4.dp))
Slider(
Expand Down Expand Up @@ -314,7 +316,7 @@ internal fun AutoRotateActionConfig(
if (action.enabled) "Auto-rotate: ON" else "Auto-rotate: OFF",
Modifier.weight(1f),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface
color = LocalContentColor.current
)
Switch(action.enabled, onCheckedChange = { newValue ->
onActionChanged(action.copy(enabled = newValue))
Expand All @@ -333,7 +335,7 @@ internal fun ScreenTimeoutActionConfig(
onActionChanged: (ConfiguredAction.ScreenTimeout) -> Unit
) {
Column {
Text("Screen Timeout", style = MaterialTheme.typography.labelMedium, fontWeight = FontWeight.Medium, color = MaterialTheme.colorScheme.onSurface)
Text("Screen Timeout", style = MaterialTheme.typography.labelMedium, fontWeight = FontWeight.Medium, color = LocalContentColor.current)
Spacer(modifier = Modifier.height(4.dp))
val options = listOf(
15_000 to "15 seconds",
Expand All @@ -352,7 +354,7 @@ internal fun ScreenTimeoutActionConfig(
selected = action.durationMs == value,
onClick = { onActionChanged(action.copy(durationMs = value)) }
)
Text(label, Modifier.padding(start = 8.dp), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface)
Text(label, Modifier.padding(start = 8.dp), style = MaterialTheme.typography.bodyMedium, color = LocalContentColor.current)
}
}
}
Expand All @@ -378,7 +380,7 @@ internal fun KeepScreenAwakeActionConfig(
if (action.enabled) "Keep Screen Awake: ON" else "Keep Screen Awake: OFF",
Modifier.weight(1f),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface
color = LocalContentColor.current
)
Switch(action.enabled, onCheckedChange = { newValue ->
onActionChanged(action.copy(enabled = newValue))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ fun CrossDeviceAutomationScreen(onBack: () -> Unit) {
label = "TabContent"
) { tab ->
when (tab) {
0, 1 -> {
0 -> DeviceManagementScreen()
1, 2 -> {
// Ask & Rules tabs need agent + LLM connection
Box(modifier = Modifier.fillMaxSize()) {
Box(
Expand All @@ -209,8 +210,8 @@ fun CrossDeviceAutomationScreen(onBack: () -> Unit) {
.then(if (!isAIReady) Modifier.blur(12.dp) else Modifier)
) {
when (tab) {
0 -> PromptScreen()
1 -> DesktopAutomationScreen()
2 -> PromptScreen()
}
}
if (!isAIReady) {
Expand Down Expand Up @@ -244,7 +245,6 @@ fun CrossDeviceAutomationScreen(onBack: () -> Unit) {
}
}
}
2 -> DeviceManagementScreen()
}
}
}
Expand All @@ -263,9 +263,9 @@ private data class TabItem(val title: String, val icon: ImageVector)
@Composable
private fun StyledTabRow(selectedTab: Int, onTabSelected: (Int) -> Unit) {
val tabs = listOf(
TabItem("Ask", Icons.Default.SmartToy),
TabItem("Devices", Icons.Default.Devices),
TabItem("Rules", Icons.AutoMirrored.Filled.Rule),
TabItem("Devices", Icons.Default.Devices)
TabItem("Ask", Icons.Default.SmartToy)
)

Row(
Expand Down
Loading
Loading