diff --git a/app/screenshots/01_welcome.png b/app/screenshots/01_welcome.png index 459ac81d..8e64e0d7 100644 Binary files a/app/screenshots/01_welcome.png and b/app/screenshots/01_welcome.png differ diff --git a/app/screenshots/02_dashboard_empty.png b/app/screenshots/02_dashboard_empty.png index 2cba1be5..130ebb59 100644 Binary files a/app/screenshots/02_dashboard_empty.png and b/app/screenshots/02_dashboard_empty.png differ diff --git a/app/screenshots/03_dashboard_with_integrations.png b/app/screenshots/03_dashboard_with_integrations.png index bfc8af21..2a451469 100644 Binary files a/app/screenshots/03_dashboard_with_integrations.png and b/app/screenshots/03_dashboard_with_integrations.png differ diff --git a/app/screenshots/04_dashboard_cert_renewing.png b/app/screenshots/04_dashboard_cert_renewing.png index 2824dbb0..85ff6c94 100644 Binary files a/app/screenshots/04_dashboard_cert_renewing.png and b/app/screenshots/04_dashboard_cert_renewing.png differ diff --git a/app/screenshots/05_dashboard_cert_expired_failing.png b/app/screenshots/05_dashboard_cert_expired_failing.png index 33c278a5..da4c699a 100644 Binary files a/app/screenshots/05_dashboard_cert_expired_failing.png and b/app/screenshots/05_dashboard_cert_expired_failing.png differ diff --git a/app/screenshots/06_dashboard_cert_expired_renewing.png b/app/screenshots/06_dashboard_cert_expired_renewing.png index cd6a46c8..94302022 100644 Binary files a/app/screenshots/06_dashboard_cert_expired_renewing.png and b/app/screenshots/06_dashboard_cert_expired_renewing.png differ diff --git a/app/screenshots/07_dashboard_cert_rate_limited.png b/app/screenshots/07_dashboard_cert_rate_limited.png index 959df802..4964902a 100644 Binary files a/app/screenshots/07_dashboard_cert_rate_limited.png and b/app/screenshots/07_dashboard_cert_rate_limited.png differ diff --git a/app/screenshots/08_dashboard_cert_onboarding.png b/app/screenshots/08_dashboard_cert_onboarding.png index b8f5b64a..67cf1ed3 100644 Binary files a/app/screenshots/08_dashboard_cert_onboarding.png and b/app/screenshots/08_dashboard_cert_onboarding.png differ diff --git a/app/screenshots/09_add_integration_picker.png b/app/screenshots/09_add_integration_picker.png index 137d7b07..25619200 100644 Binary files a/app/screenshots/09_add_integration_picker.png and b/app/screenshots/09_add_integration_picker.png differ diff --git a/app/screenshots/10_add_integration_picker_disabled.png b/app/screenshots/10_add_integration_picker_disabled.png index cc1893b0..8219c900 100644 Binary files a/app/screenshots/10_add_integration_picker_disabled.png and b/app/screenshots/10_add_integration_picker_disabled.png differ diff --git a/app/screenshots/11_notification_preferences.png b/app/screenshots/11_notification_preferences.png index 8f8fd471..68abe6ca 100644 Binary files a/app/screenshots/11_notification_preferences.png and b/app/screenshots/11_notification_preferences.png differ diff --git a/app/screenshots/12_setting_up_first_time.png b/app/screenshots/12_setting_up_first_time.png index 98f696c5..749d43d3 100644 Binary files a/app/screenshots/12_setting_up_first_time.png and b/app/screenshots/12_setting_up_first_time.png differ diff --git a/app/screenshots/13_setting_up_refreshing.png b/app/screenshots/13_setting_up_refreshing.png index 3e03ec62..0f4811cb 100644 Binary files a/app/screenshots/13_setting_up_refreshing.png and b/app/screenshots/13_setting_up_refreshing.png differ diff --git a/app/screenshots/14_setting_up_rate_limited.png b/app/screenshots/14_setting_up_rate_limited.png index 130c3fef..e68e1047 100644 Binary files a/app/screenshots/14_setting_up_rate_limited.png and b/app/screenshots/14_setting_up_rate_limited.png differ diff --git a/app/screenshots/15_integration_enabled.png b/app/screenshots/15_integration_enabled.png index 6a2b1132..c24a084b 100644 Binary files a/app/screenshots/15_integration_enabled.png and b/app/screenshots/15_integration_enabled.png differ diff --git a/app/screenshots/16_integration_manage_active.png b/app/screenshots/16_integration_manage_active.png index b8ce6494..abd83e01 100644 Binary files a/app/screenshots/16_integration_manage_active.png and b/app/screenshots/16_integration_manage_active.png differ diff --git a/app/screenshots/17_integration_manage_pending.png b/app/screenshots/17_integration_manage_pending.png index 24f975cd..ed20ef5c 100644 Binary files a/app/screenshots/17_integration_manage_pending.png and b/app/screenshots/17_integration_manage_pending.png differ diff --git a/app/screenshots/18_device_code_approval_empty.png b/app/screenshots/18_device_code_approval_empty.png index 10771322..1c8a8e01 100644 Binary files a/app/screenshots/18_device_code_approval_empty.png and b/app/screenshots/18_device_code_approval_empty.png differ diff --git a/app/screenshots/19_device_code_approval_filled.png b/app/screenshots/19_device_code_approval_filled.png index 72d15749..5920840a 100644 Binary files a/app/screenshots/19_device_code_approval_filled.png and b/app/screenshots/19_device_code_approval_filled.png differ diff --git a/app/screenshots/20_connection_confirmed.png b/app/screenshots/20_connection_confirmed.png index 0e7a9231..505afa59 100644 Binary files a/app/screenshots/20_connection_confirmed.png and b/app/screenshots/20_connection_confirmed.png differ diff --git a/app/screenshots/21_audit_history_populated.png b/app/screenshots/21_audit_history_populated.png index bd8cbc53..21349248 100644 Binary files a/app/screenshots/21_audit_history_populated.png and b/app/screenshots/21_audit_history_populated.png differ diff --git a/app/screenshots/22_audit_history_empty.png b/app/screenshots/22_audit_history_empty.png index cfd99e62..5aace2f1 100644 Binary files a/app/screenshots/22_audit_history_empty.png and b/app/screenshots/22_audit_history_empty.png differ diff --git a/app/screenshots/23_audit_history_filtered.png b/app/screenshots/23_audit_history_filtered.png index 2c574c5d..51a56663 100644 Binary files a/app/screenshots/23_audit_history_filtered.png and b/app/screenshots/23_audit_history_filtered.png differ diff --git a/app/screenshots/24_settings.png b/app/screenshots/24_settings.png index fbbef96d..d4197653 100644 Binary files a/app/screenshots/24_settings.png and b/app/screenshots/24_settings.png differ diff --git a/app/screenshots/26_health_connect_setup.png b/app/screenshots/26_health_connect_setup.png index e1d56db0..91244d9f 100644 Binary files a/app/screenshots/26_health_connect_setup.png and b/app/screenshots/26_health_connect_setup.png differ diff --git a/app/screenshots/27_health_connect_settings.png b/app/screenshots/27_health_connect_settings.png index 92a5274e..2db3a228 100644 Binary files a/app/screenshots/27_health_connect_settings.png and b/app/screenshots/27_health_connect_settings.png differ diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/AddIntegrationPickerScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/AddIntegrationPickerScreen.kt index ed4c0714..696805ad 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/AddIntegrationPickerScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/AddIntegrationPickerScreen.kt @@ -14,18 +14,14 @@ import androidx.compose.material3.Button import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Scaffold import androidx.compose.material3.Text -import androidx.compose.material3.TextButton import androidx.compose.material3.TopAppBar import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -67,7 +63,7 @@ fun AddIntegrationPickerScreen( .padding(padding) .padding(horizontal = 16.dp) ) { - LazyColumn(modifier = Modifier.weight(1f)) { + LazyColumn(modifier = Modifier.fillMaxSize()) { items(integrations) { integration -> Card( modifier = Modifier @@ -87,11 +83,7 @@ fun AddIntegrationPickerScreen( val isUnavailable = integration.state == PickerIntegrationState.UNAVAILABLE Text( - text = if (isUnavailable) { - "${integration.name} (coming soon)" - } else { - integration.name - }, + text = integration.name, style = MaterialTheme.typography.titleMedium, color = if (isUnavailable) { MaterialTheme.colorScheme.onSurfaceVariant @@ -113,33 +105,22 @@ fun AddIntegrationPickerScreen( } } PickerIntegrationState.DISABLED -> { - OutlinedButton(onClick = { onReEnable(integration.id) }) { + Button(onClick = { onReEnable(integration.id) }) { Text("Re-enable") } } PickerIntegrationState.UNAVAILABLE -> { - OutlinedButton(onClick = {}, enabled = false) { - Text("Soon") - } + Text( + text = "Coming soon", + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) } } } } - - if (integration != integrations.last()) { - HorizontalDivider(modifier = Modifier.padding(vertical = 4.dp)) - } } } - - TextButton( - onClick = onCancel, - modifier = Modifier - .align(Alignment.End) - .padding(bottom = 16.dp) - ) { - Text("Cancel") - } } } } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/AuditHistoryScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/AuditHistoryScreen.kt index 4f9391e2..d0c56ca8 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/AuditHistoryScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/AuditHistoryScreen.kt @@ -1,5 +1,6 @@ package com.rousecontext.app.ui.screens +import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -8,12 +9,14 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.History import androidx.compose.material.icons.filled.Home import androidx.compose.material.icons.filled.Settings +import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Card import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.ExperimentalMaterial3Api @@ -38,6 +41,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -140,15 +144,22 @@ fun AuditHistoryScreen( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center ) { + Icon( + Icons.Default.History, + contentDescription = null, + modifier = Modifier.size(48.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant + ) + Spacer(modifier = Modifier.height(16.dp)) Text( - text = "No audit entries yet.", + text = "No audit entries yet", style = MaterialTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center ) Spacer(modifier = Modifier.height(8.dp)) Text( - text = "Activity will appear here after AI clients access your data.", + text = "Activity will appear here after\nAI clients access your data.", style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center @@ -161,45 +172,59 @@ fun AuditHistoryScreen( Text( text = group.dateLabel, style = MaterialTheme.typography.titleSmall, - modifier = Modifier.padding(top = 12.dp, bottom = 8.dp) + color = MaterialTheme.colorScheme.primary, + modifier = Modifier.padding(top = 16.dp, bottom = 4.dp) ) } item { Card(modifier = Modifier.fillMaxWidth()) { Column { group.entries.forEachIndexed { index, entry -> - Column(modifier = Modifier.padding(16.dp)) { + Column( + modifier = Modifier.padding( + horizontal = 16.dp, + vertical = 12.dp + ) + ) { Row( modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically ) { - Text( - entry.time, - style = MaterialTheme.typography.bodySmall - ) Text( entry.toolName, - style = MaterialTheme.typography.bodyMedium + style = MaterialTheme.typography.bodyMedium, + fontWeight = FontWeight.Medium, + modifier = Modifier.weight(1f) ) - } - Row { Text( - "${entry.durationMs}ms", + entry.time, style = MaterialTheme.typography.bodySmall, color = MaterialTheme .colorScheme.onSurfaceVariant ) - Spacer(modifier = Modifier.width(8.dp)) + } + Spacer(modifier = Modifier.height(2.dp)) + Row { Text( - "args: ${entry.arguments}", - style = MaterialTheme.typography.bodySmall, + "${entry.durationMs}ms", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme + .colorScheme.onSurfaceVariant + ) + Spacer(modifier = Modifier.width(12.dp)) + Text( + entry.arguments, + style = MaterialTheme.typography.labelSmall, color = MaterialTheme .colorScheme.onSurfaceVariant ) } } if (index < group.entries.lastIndex) { - HorizontalDivider() + HorizontalDivider( + modifier = Modifier.padding(horizontal = 16.dp) + ) } } } @@ -212,7 +237,14 @@ fun AuditHistoryScreen( onClick = onClearHistory, modifier = Modifier .fillMaxWidth() - .padding(vertical = 16.dp) + .padding(vertical = 16.dp), + colors = ButtonDefaults.outlinedButtonColors( + contentColor = MaterialTheme.colorScheme.error + ), + border = BorderStroke( + 1.dp, + MaterialTheme.colorScheme.error.copy(alpha = 0.5f) + ) ) { Text("Clear history") } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/ConnectionConfirmedScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/ConnectionConfirmedScreen.kt index d3f680fd..d74022b3 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/ConnectionConfirmedScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/ConnectionConfirmedScreen.kt @@ -1,9 +1,9 @@ package com.rousecontext.app.ui.screens -import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size @@ -28,13 +28,14 @@ fun ConnectionConfirmedScreen(onBackToHome: () -> Unit = {}) { modifier = Modifier .fillMaxSize() .padding(32.dp), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.Center + horizontalAlignment = Alignment.CenterHorizontally ) { + Spacer(modifier = Modifier.weight(1f)) + Icon( imageVector = Icons.Default.CheckCircle, contentDescription = "Connected", - modifier = Modifier.size(72.dp), + modifier = Modifier.size(96.dp), tint = MaterialTheme.colorScheme.primary ) @@ -42,22 +43,26 @@ fun ConnectionConfirmedScreen(onBackToHome: () -> Unit = {}) { Text( text = "Connected", - style = MaterialTheme.typography.headlineMedium + style = MaterialTheme.typography.headlineLarge ) Spacer(modifier = Modifier.height(12.dp)) Text( text = "Your AI client is now authorized.", - style = MaterialTheme.typography.bodyLarge, - color = MaterialTheme.colorScheme.onSurfaceVariant + style = MaterialTheme.typography.bodyLarge ) - Spacer(modifier = Modifier.height(48.dp)) + Spacer(modifier = Modifier.weight(1f)) - Button(onClick = onBackToHome) { + Button( + onClick = onBackToHome, + modifier = Modifier.fillMaxWidth() + ) { Text("Back to Home") } + + Spacer(modifier = Modifier.height(24.dp)) } } } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/DeviceCodeApprovalScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/DeviceCodeApprovalScreen.kt index 94bb3fc2..cf15d60e 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/DeviceCodeApprovalScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/DeviceCodeApprovalScreen.kt @@ -1,5 +1,6 @@ package com.rousecontext.app.ui.screens +import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -29,6 +30,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview @@ -102,18 +104,29 @@ fun DeviceCodeApprovalScreen( onClick = onApprove, enabled = code.length == state.codeLength && !state.isApproving, modifier = Modifier.fillMaxWidth(), - colors = ButtonDefaults.buttonColors(containerColor = TealPrimary) + colors = ButtonDefaults.buttonColors( + containerColor = TealPrimary, + disabledContainerColor = TealPrimary.copy(alpha = 0.25f), + disabledContentColor = Color.White.copy(alpha = 0.5f) + ) ) { - Text("Approve", modifier = Modifier.padding(vertical = 4.dp)) + Text("Approve") } Spacer(modifier = Modifier.height(12.dp)) OutlinedButton( onClick = onDeny, - modifier = Modifier.fillMaxWidth() + modifier = Modifier.fillMaxWidth(), + colors = ButtonDefaults.outlinedButtonColors( + contentColor = MaterialTheme.colorScheme.error + ), + border = androidx.compose.foundation.BorderStroke( + 1.dp, + MaterialTheme.colorScheme.error.copy(alpha = 0.5f) + ) ) { - Text("Deny", modifier = Modifier.padding(vertical = 4.dp)) + Text("Deny") } } } @@ -131,16 +144,22 @@ private fun CodeInputRow(code: String, length: Int, onCodeChanged: (String) -> U decorationBox = { Column(horizontalAlignment = Alignment.CenterHorizontally) { // First row (4 boxes) - Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) { for (i in 0 until length / 2) { - CodeBox(char = code.getOrNull(i)) + CodeBox( + char = code.getOrNull(i), + isNext = i == code.length + ) } } - Spacer(modifier = Modifier.height(12.dp)) + Spacer(modifier = Modifier.height(10.dp)) // Second row (4 boxes) - Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) { for (i in length / 2 until length) { - CodeBox(char = code.getOrNull(i)) + CodeBox( + char = code.getOrNull(i), + isNext = i == code.length + ) } } } @@ -149,25 +168,33 @@ private fun CodeInputRow(code: String, length: Int, onCodeChanged: (String) -> U } @Composable -private fun CodeBox(char: Char?) { +private fun CodeBox(char: Char?, isNext: Boolean = false) { Box( modifier = Modifier .size(56.dp) .border( width = 2.dp, - color = if (char != null) { - TealPrimary - } else { - MaterialTheme.colorScheme.outline + color = when { + char != null -> TealPrimary + isNext -> TealPrimary.copy(alpha = 0.5f) + else -> Color.White.copy(alpha = 0.2f) }, shape = RoundedCornerShape(12.dp) ), contentAlignment = Alignment.Center ) { - Text( - text = char?.toString() ?: "", - style = MaterialTheme.typography.headlineMedium - ) + if (char != null) { + Text( + text = char.toString(), + style = MaterialTheme.typography.headlineMedium + ) + } else if (isNext) { + Box( + modifier = Modifier + .size(width = 2.dp, height = 24.dp) + .background(TealPrimary.copy(alpha = 0.6f)) + ) + } } } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/HealthConnectSettingsScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/HealthConnectSettingsScreen.kt index 9318fcac..62d352d9 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/HealthConnectSettingsScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/HealthConnectSettingsScreen.kt @@ -7,10 +7,15 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack +import androidx.compose.material.icons.filled.CheckCircle +import androidx.compose.material.icons.filled.RadioButtonUnchecked import androidx.compose.material3.Card -import androidx.compose.material3.Checkbox import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon @@ -63,36 +68,49 @@ fun HealthConnectSettingsScreen( .fillMaxSize() .padding(padding) .padding(horizontal = 16.dp) + .verticalScroll(rememberScrollState()) ) { Spacer(modifier = Modifier.height(16.dp)) Text( text = "Permissions", - style = MaterialTheme.typography.titleMedium + style = MaterialTheme.typography.titleSmall, + color = MaterialTheme.colorScheme.primary, + modifier = Modifier.padding(vertical = 8.dp) ) - Spacer(modifier = Modifier.height(8.dp)) - Card(modifier = Modifier.fillMaxWidth()) { Column { state.permissions.forEachIndexed { index, permission -> Row( modifier = Modifier .fillMaxWidth() - .padding(horizontal = 16.dp, vertical = 8.dp), + .padding(horizontal = 16.dp, vertical = 12.dp), verticalAlignment = Alignment.CenterVertically ) { - Checkbox( - checked = permission.granted, - onCheckedChange = null, - enabled = false + Icon( + imageVector = if (permission.granted) { + Icons.Default.CheckCircle + } else { + Icons.Default.RadioButtonUnchecked + }, + contentDescription = if (permission.granted) { + "Granted" + } else { + "Not granted" + }, + modifier = Modifier.size(20.dp), + tint = if (permission.granted) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.outline + } ) + Spacer(modifier = Modifier.width(12.dp)) Text( text = permission.name, style = MaterialTheme.typography.bodyLarge, - modifier = Modifier - .weight(1f) - .padding(start = 8.dp) + modifier = Modifier.weight(1f) ) if (!permission.granted) { TextButton( @@ -103,11 +121,23 @@ fun HealthConnectSettingsScreen( } } if (index < state.permissions.lastIndex) { - HorizontalDivider() + HorizontalDivider(modifier = Modifier.padding(horizontal = 16.dp)) } } } } + + Spacer(modifier = Modifier.height(24.dp)) + + Text( + text = "Permissions are enforced per session. " + + "Revoking access takes effect immediately.", + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(horizontal = 4.dp) + ) + + Spacer(modifier = Modifier.height(24.dp)) } } } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/HealthConnectSetupScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/HealthConnectSetupScreen.kt index 796a7871..a4a4698e 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/HealthConnectSetupScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/HealthConnectSetupScreen.kt @@ -56,7 +56,7 @@ fun HealthConnectSetupScreen(onGrantAccess: () -> Unit = {}, onCancel: () -> Uni Text( text = "We'll request access to:", - style = MaterialTheme.typography.bodyLarge + style = MaterialTheme.typography.titleSmall ) Spacer(modifier = Modifier.height(12.dp)) diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/IntegrationEnabledScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/IntegrationEnabledScreen.kt index bf6988ee..eb173004 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/IntegrationEnabledScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/IntegrationEnabledScreen.kt @@ -69,7 +69,7 @@ fun IntegrationEnabledScreen( Icon( imageVector = Icons.Default.CheckCircle, contentDescription = null, - modifier = Modifier.size(48.dp), + modifier = Modifier.size(64.dp), tint = MaterialTheme.colorScheme.primary ) @@ -127,11 +127,11 @@ fun IntegrationEnabledScreen( Row(verticalAlignment = Alignment.CenterVertically) { CircularProgressIndicator( - modifier = Modifier.size(16.dp), + modifier = Modifier.size(24.dp), color = TealPrimary, - strokeWidth = 2.dp + strokeWidth = 2.5.dp ) - Spacer(modifier = Modifier.width(8.dp)) + Spacer(modifier = Modifier.width(10.dp)) Text( text = "Waiting for connection...", style = MaterialTheme.typography.bodyMedium, @@ -142,7 +142,7 @@ fun IntegrationEnabledScreen( Spacer(modifier = Modifier.weight(1f)) TextButton(onClick = onCancel) { - Text("Cancel") + Text("Done") } } } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/IntegrationManageScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/IntegrationManageScreen.kt index 40dacaea..6f8ee4f9 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/IntegrationManageScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/IntegrationManageScreen.kt @@ -1,5 +1,7 @@ package com.rousecontext.app.ui.screens +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -10,11 +12,11 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.ContentCopy -import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3Api @@ -31,6 +33,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.rousecontext.app.ui.theme.RouseContextTheme @@ -69,16 +72,23 @@ fun IntegrationManageScreen( Row(verticalAlignment = Alignment.CenterVertically) { Text(state.integrationName) Spacer(modifier = Modifier.width(12.dp)) + val badgeColor = when (state.status) { + IntegrationStatus.ACTIVE -> MaterialTheme.colorScheme.primary + IntegrationStatus.PENDING -> MaterialTheme.colorScheme.tertiary + } Text( text = when (state.status) { IntegrationStatus.ACTIVE -> "Active" IntegrationStatus.PENDING -> "Pending" }, style = MaterialTheme.typography.labelMedium, - color = when (state.status) { - IntegrationStatus.ACTIVE -> MaterialTheme.colorScheme.primary - IntegrationStatus.PENDING -> MaterialTheme.colorScheme.tertiary - } + color = badgeColor, + modifier = Modifier + .background( + color = badgeColor.copy(alpha = 0.15f), + shape = RoundedCornerShape(4.dp) + ) + .padding(horizontal = 8.dp, vertical = 2.dp) ) } }, @@ -131,10 +141,12 @@ fun IntegrationManageScreen( Text( text = "Waiting for first client...", style = MaterialTheme.typography.bodyLarge, - color = MaterialTheme.colorScheme.onSurfaceVariant + fontWeight = FontWeight.SemiBold ) + Spacer(modifier = Modifier.height(16.dp)) Text( - text = "Add the URL above to your AI client to get started.", + text = "To connect, add the URL above to your AI client. " + + "This screen will update automatically once a client connects.", style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant ) @@ -148,22 +160,52 @@ fun IntegrationManageScreen( ) Spacer(modifier = Modifier.height(8.dp)) } - items(state.recentActivity) { entry -> - Row( - modifier = Modifier - .fillMaxWidth() - .padding(vertical = 4.dp), - horizontalArrangement = Arrangement.SpaceBetween - ) { - Text(entry.time, style = MaterialTheme.typography.bodySmall) - Text(entry.toolName, style = MaterialTheme.typography.bodySmall) - Text("${entry.durationMs}ms", style = MaterialTheme.typography.bodySmall) - } - } if (state.recentActivity.isNotEmpty()) { item { - TextButton(onClick = onViewAllActivity) { - Text("View all") + Card(modifier = Modifier.fillMaxWidth()) { + Column { + state.recentActivity.forEachIndexed { index, entry -> + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 12.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text( + entry.toolName, + style = MaterialTheme.typography.bodyMedium, + fontWeight = FontWeight.Medium, + modifier = Modifier.weight(1f) + ) + Text( + entry.time, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + Spacer(modifier = Modifier.width(12.dp)) + Text( + "${entry.durationMs}ms", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + if (index < state.recentActivity.lastIndex) { + HorizontalDivider( + modifier = Modifier.padding(horizontal = 16.dp) + ) + } + } + } + } + Spacer(modifier = Modifier.height(4.dp)) + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.End + ) { + TextButton(onClick = onViewAllActivity) { + Text("View all") + } } Spacer(modifier = Modifier.height(16.dp)) } @@ -182,7 +224,7 @@ fun IntegrationManageScreen( if (state.authorizedClients.isEmpty()) { item { Text( - text = "(none yet)", + text = "No clients authorized yet", style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant ) @@ -190,7 +232,12 @@ fun IntegrationManageScreen( } } else { item { - Card(modifier = Modifier.fillMaxWidth()) { + Card( + modifier = Modifier.fillMaxWidth(), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surfaceVariant + ) + ) { Column { state.authorizedClients.forEachIndexed { index, client -> Row( @@ -211,12 +258,19 @@ fun IntegrationManageScreen( color = MaterialTheme.colorScheme.onSurfaceVariant ) } - TextButton(onClick = { onRevokeClient(client.name) }) { - Text("Revoke") + TextButton( + onClick = { onRevokeClient(client.name) } + ) { + Text( + "Revoke", + color = MaterialTheme.colorScheme.error + ) } } if (index < state.authorizedClients.lastIndex) { - HorizontalDivider() + HorizontalDivider( + modifier = Modifier.padding(horizontal = 16.dp) + ) } } } @@ -227,7 +281,7 @@ fun IntegrationManageScreen( // Action buttons item { - Button( + OutlinedButton( onClick = onSettings, modifier = Modifier.fillMaxWidth() ) { @@ -236,9 +290,22 @@ fun IntegrationManageScreen( Spacer(modifier = Modifier.height(8.dp)) OutlinedButton( onClick = onDisable, - modifier = Modifier.fillMaxWidth() + modifier = Modifier.fillMaxWidth(), + colors = ButtonDefaults.outlinedButtonColors( + contentColor = MaterialTheme.colorScheme.error + ), + border = BorderStroke( + 1.dp, + MaterialTheme.colorScheme.error.copy(alpha = 0.5f) + ) ) { - Text("Disable Integration") + Text( + if (state.status == IntegrationStatus.PENDING) { + "Cancel Setup" + } else { + "Disable Integration" + } + ) } Spacer(modifier = Modifier.height(24.dp)) } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/MainDashboardScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/MainDashboardScreen.kt index 366601a2..28809e02 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/MainDashboardScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/MainDashboardScreen.kt @@ -12,16 +12,22 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.filled.Build import androidx.compose.material.icons.filled.Circle +import androidx.compose.material.icons.filled.ContentCopy +import androidx.compose.material.icons.filled.ErrorOutline import androidx.compose.material.icons.filled.History import androidx.compose.material.icons.filled.Home +import androidx.compose.material.icons.filled.Schedule import androidx.compose.material.icons.filled.Settings +import androidx.compose.material.icons.filled.Sync import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults +import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon @@ -29,7 +35,6 @@ import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.NavigationBar import androidx.compose.material3.NavigationBarItem -import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TextButton @@ -38,6 +43,8 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.rousecontext.app.ui.theme.RouseContextTheme @@ -129,20 +136,21 @@ fun MainDashboardScreen( .padding(padding) .padding(horizontal = 16.dp) ) { + // Cert banner (most urgent — show first) + state.certBanner?.let { banner -> + item { + Spacer(modifier = Modifier.height(8.dp)) + CertBannerCard(banner, onRetryRenewal) + Spacer(modifier = Modifier.height(12.dp)) + } + } + // Connection status item { ConnectionStatusRow(state.connectionStatus, state.activeSessionCount) Spacer(modifier = Modifier.height(16.dp)) } - // Cert banner - state.certBanner?.let { banner -> - item { - CertBannerCard(banner, onRetryRenewal) - Spacer(modifier = Modifier.height(16.dp)) - } - } - // Integrations header item { Row( @@ -195,13 +203,26 @@ fun MainDashboardScreen( style = MaterialTheme.typography.titleMedium ) Spacer(modifier = Modifier.height(8.dp)) - } - items(state.recentActivity) { entry -> - ActivityRow(entry) - } - item { - TextButton(onClick = onViewAllActivity) { - Text("View all") + Card(modifier = Modifier.fillMaxWidth()) { + Column { + state.recentActivity.forEachIndexed { index, entry -> + ActivityRow(entry) + if (index < state.recentActivity.lastIndex) { + HorizontalDivider( + modifier = Modifier.padding(horizontal = 16.dp) + ) + } + } + } + } + Spacer(modifier = Modifier.height(4.dp)) + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.End + ) { + TextButton(onClick = onViewAllActivity) { + Text("View all") + } } } } @@ -243,7 +264,7 @@ private fun CertBannerCard(banner: CertBanner, onRetry: () -> Unit) { } else { MaterialTheme.colorScheme.secondaryContainer } - is CertBanner.RateLimited -> MaterialTheme.colorScheme.tertiaryContainer + is CertBanner.RateLimited -> MaterialTheme.colorScheme.secondaryContainer is CertBanner.Renewing -> MaterialTheme.colorScheme.secondaryContainer is CertBanner.Onboarding -> MaterialTheme.colorScheme.secondaryContainer } @@ -252,82 +273,176 @@ private fun CertBannerCard(banner: CertBanner, onRetry: () -> Unit) { modifier = Modifier.fillMaxWidth(), colors = CardDefaults.cardColors(containerColor = containerColor) ) { - Column(modifier = Modifier.padding(16.dp)) { + Row( + modifier = Modifier.padding(16.dp), + verticalAlignment = Alignment.Top + ) { when (banner) { - is CertBanner.Renewing -> { - Text( - "Refreshing your certificate...", - style = MaterialTheme.typography.bodyMedium - ) - Text( - "Integrations may be briefly unavailable.", - style = MaterialTheme.typography.bodySmall - ) - } + is CertBanner.Renewing -> Icon( + Icons.Default.Sync, + contentDescription = null, + modifier = Modifier.size(20.dp) + ) is CertBanner.Expired -> if (banner.renewalInProgress) { - Text( - "Certificate expired. Renewing...", - style = MaterialTheme.typography.bodyMedium - ) - Text( - "Integrations are offline until this completes.", - style = MaterialTheme.typography.bodySmall + Icon( + Icons.Default.Sync, + contentDescription = null, + modifier = Modifier.size(20.dp) ) } else { - Text( - "Certificate expired. Renewal failed — check your connection.", - style = MaterialTheme.typography.bodyMedium - ) - Spacer(modifier = Modifier.height(8.dp)) - OutlinedButton(onClick = onRetry) { Text("Retry") } - } - is CertBanner.RateLimited -> { - Text( - "Certificate issuance delayed.", - style = MaterialTheme.typography.bodyMedium - ) - Text( - "Will retry automatically on ${banner.retryDate}.", - style = MaterialTheme.typography.bodySmall + Icon( + Icons.Default.ErrorOutline, + contentDescription = null, + modifier = Modifier.size(20.dp), + tint = MaterialTheme.colorScheme.onErrorContainer ) } - is CertBanner.Onboarding -> { - Text("Setting up your device...", style = MaterialTheme.typography.bodyMedium) - Spacer(modifier = Modifier.height(4.dp)) - val checkMark = "\u2713" - val dots = "..." - val genStatus = if (banner.generatingKeysDone) checkMark else dots - Text( - text = "Generating keys $genStatus", - style = MaterialTheme.typography.bodySmall - ) - Text( - text = "Registering ${if (banner.registeringDone) checkMark else dots}", - style = MaterialTheme.typography.bodySmall - ) - Text( - text = "Issuing certificate${if (banner.issuingCert) dots else ""}", - style = MaterialTheme.typography.bodySmall - ) + is CertBanner.RateLimited -> Icon( + Icons.Default.Schedule, + contentDescription = null, + modifier = Modifier.size(20.dp) + ) + is CertBanner.Onboarding -> Icon( + Icons.Default.Build, + contentDescription = null, + modifier = Modifier.size(20.dp) + ) + } + Spacer(modifier = Modifier.width(12.dp)) + Column(modifier = Modifier.weight(1f)) { + when (banner) { + is CertBanner.Renewing -> { + Text( + "Refreshing your certificate...", + style = MaterialTheme.typography.titleSmall + ) + Spacer(modifier = Modifier.height(2.dp)) + Text( + "Integrations may be briefly unavailable.", + style = MaterialTheme.typography.bodySmall + ) + } + is CertBanner.Expired -> if (banner.renewalInProgress) { + Text( + "Certificate expired. Renewing...", + style = MaterialTheme.typography.titleSmall + ) + Spacer(modifier = Modifier.height(2.dp)) + Text( + "Integrations are offline until this completes.", + style = MaterialTheme.typography.bodySmall + ) + } else { + Text( + "Certificate expired", + style = MaterialTheme.typography.titleSmall + ) + Spacer(modifier = Modifier.height(2.dp)) + Text( + "Renewal failed \u2014 check your connection.", + style = MaterialTheme.typography.bodySmall + ) + Spacer(modifier = Modifier.height(12.dp)) + Button( + onClick = onRetry, + colors = ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.onErrorContainer, + contentColor = MaterialTheme.colorScheme.errorContainer + ) + ) { Text("Retry") } + } + is CertBanner.RateLimited -> { + Text( + "Certificate issuance delayed", + style = MaterialTheme.typography.titleSmall + ) + Spacer(modifier = Modifier.height(2.dp)) + Text( + "Will retry automatically on ${banner.retryDate}.", + style = MaterialTheme.typography.bodySmall + ) + } + is CertBanner.Onboarding -> { + Text( + "Setting up your device...", + style = MaterialTheme.typography.titleSmall + ) + Spacer(modifier = Modifier.height(8.dp)) + OnboardingStep("Generating keys", banner.generatingKeysDone) + Spacer(modifier = Modifier.height(4.dp)) + OnboardingStep("Registering", banner.registeringDone) + Spacer(modifier = Modifier.height(4.dp)) + OnboardingStep( + "Issuing certificate", + done = false, + active = banner.issuingCert + ) + } } } } } } +@Composable +private fun OnboardingStep(label: String, done: Boolean, active: Boolean = false) { + Row(verticalAlignment = Alignment.CenterVertically) { + when { + done -> Icon( + Icons.Default.Circle, + contentDescription = null, + modifier = Modifier.size(8.dp), + tint = MaterialTheme.colorScheme.primary + ) + active -> CircularProgressIndicator( + modifier = Modifier.size(10.dp), + strokeWidth = 2.dp + ) + else -> Icon( + Icons.Default.Circle, + contentDescription = null, + modifier = Modifier.size(8.dp), + tint = MaterialTheme.colorScheme.outline + ) + } + Spacer(modifier = Modifier.width(8.dp)) + Text( + text = label, + style = MaterialTheme.typography.bodySmall, + color = if (done) { + MaterialTheme.colorScheme.onSecondaryContainer + } else if (active) { + MaterialTheme.colorScheme.onSecondaryContainer + } else { + MaterialTheme.colorScheme.onSurfaceVariant + } + ) + } +} + @Composable private fun EmptyIntegrationsCard(onAdd: () -> Unit) { Card(modifier = Modifier.fillMaxWidth()) { Column( - modifier = Modifier.padding(24.dp), + modifier = Modifier + .fillMaxWidth() + .padding(24.dp), horizontalAlignment = Alignment.CenterHorizontally ) { Text( text = "No integrations enabled yet.", style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant + color = MaterialTheme.colorScheme.onSurfaceVariant, + textAlign = TextAlign.Center ) - Spacer(modifier = Modifier.height(12.dp)) + Spacer(modifier = Modifier.height(4.dp)) + Text( + text = "Connect AI assistants to your phone's data.", + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + textAlign = TextAlign.Center + ) + Spacer(modifier = Modifier.height(16.dp)) Button(onClick = onAdd) { Icon(Icons.Default.Add, contentDescription = null) Spacer(modifier = Modifier.width(8.dp)) @@ -381,9 +496,13 @@ private fun IntegrationRow(integration: IntegrationItem, onClick: () -> Unit, on IntegrationStatus.PENDING -> MaterialTheme.colorScheme.tertiary } ) - Spacer(modifier = Modifier.width(8.dp)) - TextButton(onClick = onCopy) { - Text("Copy") + Spacer(modifier = Modifier.width(4.dp)) + IconButton(onClick = onCopy) { + Icon( + Icons.Default.ContentCopy, + contentDescription = "Copy URL", + modifier = Modifier.size(18.dp) + ) } } } @@ -394,12 +513,27 @@ private fun ActivityRow(entry: AuditEntry) { Row( modifier = Modifier .fillMaxWidth() - .padding(vertical = 4.dp), - horizontalArrangement = Arrangement.SpaceBetween + .padding(horizontal = 16.dp, vertical = 12.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically ) { - Text(entry.time, style = MaterialTheme.typography.bodySmall) - Text(entry.toolName, style = MaterialTheme.typography.bodySmall) - Text("${entry.durationMs}ms", style = MaterialTheme.typography.bodySmall) + Text( + text = entry.toolName, + style = MaterialTheme.typography.bodyMedium, + fontWeight = FontWeight.Medium, + modifier = Modifier.weight(1f) + ) + Text( + text = entry.time, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + Spacer(modifier = Modifier.width(12.dp)) + Text( + text = "${entry.durationMs}ms", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) } } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/NotificationPreferencesScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/NotificationPreferencesScreen.kt index 8d35d0c5..067a1870 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/NotificationPreferencesScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/NotificationPreferencesScreen.kt @@ -74,7 +74,7 @@ fun NotificationPreferencesScreen( modifier = Modifier .fillMaxSize() .padding(padding) - .padding(horizontal = 24.dp) + .padding(horizontal = 16.dp) ) { Spacer(modifier = Modifier.height(24.dp)) diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/SettingUpScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/SettingUpScreen.kt index 2e35661d..dd283c91 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/SettingUpScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/SettingUpScreen.kt @@ -8,7 +8,7 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.HourglassEmpty +import androidx.compose.material.icons.filled.Schedule import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon @@ -25,6 +25,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.rousecontext.app.ui.theme.AmberAccent import com.rousecontext.app.ui.theme.RouseContextTheme import com.rousecontext.app.ui.theme.TealPrimary @@ -62,19 +63,18 @@ fun SettingUpScreen(state: SettingUpState = SettingUpState(), onCancel: () -> Un when (state.variant) { is SettingUpVariant.FirstTime, is SettingUpVariant.Refreshing -> { CircularProgressIndicator( - progress = { 0.7f }, color = TealPrimary, - trackColor = TealPrimary.copy(alpha = 0.2f), + trackColor = TealPrimary.copy(alpha = 0.35f), modifier = Modifier.size(64.dp), - strokeWidth = 5.dp, + strokeWidth = 5.dp ) } is SettingUpVariant.RateLimited -> { Icon( - imageVector = Icons.Default.HourglassEmpty, + imageVector = Icons.Default.Schedule, contentDescription = null, - modifier = Modifier.size(48.dp), - tint = MaterialTheme.colorScheme.tertiary + modifier = Modifier.size(64.dp), + tint = AmberAccent ) } } @@ -86,8 +86,7 @@ fun SettingUpScreen(state: SettingUpState = SettingUpState(), onCancel: () -> Un is SettingUpVariant.FirstTime -> "We're issuing a secure certificate for your device." is SettingUpVariant.Refreshing -> - "Your certificate is being refreshed. " + - "This usually takes about 30 seconds." + "Your certificate is being refreshed." is SettingUpVariant.RateLimited -> "Certificate issuance is temporarily delayed." }, @@ -95,7 +94,7 @@ fun SettingUpScreen(state: SettingUpState = SettingUpState(), onCancel: () -> Un textAlign = TextAlign.Center ) - Spacer(modifier = Modifier.height(8.dp)) + Spacer(modifier = Modifier.height(16.dp)) when (state.variant) { is SettingUpVariant.FirstTime -> { @@ -106,18 +105,24 @@ fun SettingUpScreen(state: SettingUpState = SettingUpState(), onCancel: () -> Un color = MaterialTheme.colorScheme.onSurfaceVariant ) } - is SettingUpVariant.Refreshing -> { /* no extra text */ } - is SettingUpVariant.RateLimited -> { + is SettingUpVariant.Refreshing -> { Text( - text = "Expected: ${state.variant.expectedDate}.", + text = "This usually takes about 30 seconds.", style = MaterialTheme.typography.bodyMedium, textAlign = TextAlign.Center, color = MaterialTheme.colorScheme.onSurfaceVariant ) } + is SettingUpVariant.RateLimited -> { + Text( + text = "Will retry on ${state.variant.expectedDate}.", + style = MaterialTheme.typography.bodyMedium, + textAlign = TextAlign.Center + ) + } } - Spacer(modifier = Modifier.height(8.dp)) + Spacer(modifier = Modifier.height(16.dp)) Text( text = "We'll notify you when it's ready.", @@ -129,7 +134,12 @@ fun SettingUpScreen(state: SettingUpState = SettingUpState(), onCancel: () -> Un Spacer(modifier = Modifier.height(32.dp)) TextButton(onClick = onCancel) { - Text("Cancel") + Text( + when (state.variant) { + is SettingUpVariant.RateLimited -> "Dismiss" + else -> "Cancel" + } + ) } } } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/SettingsScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/SettingsScreen.kt index 830093fa..5e0db8f1 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/SettingsScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/SettingsScreen.kt @@ -1,5 +1,6 @@ package com.rousecontext.app.ui.screens +import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -43,12 +44,13 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.rousecontext.app.ui.theme.AmberAccent +import com.rousecontext.app.ui.theme.OnWarningContainer import com.rousecontext.app.ui.theme.RouseContextTheme import com.rousecontext.app.ui.theme.TealPrimary +import com.rousecontext.app.ui.theme.WarningContainer @Immutable data class SettingsState( @@ -198,7 +200,7 @@ fun SettingsScreen( Card( modifier = Modifier.fillMaxWidth(), colors = CardDefaults.cardColors( - containerColor = Color(0xFF3A2800) + containerColor = WarningContainer ) ) { Row( @@ -220,14 +222,15 @@ fun SettingsScreen( Text( "Disable to ensure reliable wake-ups.", style = MaterialTheme.typography.bodySmall, - color = Color(0xFFFFE0A0) + color = OnWarningContainer ) } OutlinedButton( onClick = onFixBatteryOptimization, colors = ButtonDefaults.outlinedButtonColors( contentColor = AmberAccent - ) + ), + border = BorderStroke(1.dp, AmberAccent) ) { Text("Fix this") } diff --git a/app/src/main/java/com/rousecontext/app/ui/screens/WelcomeScreen.kt b/app/src/main/java/com/rousecontext/app/ui/screens/WelcomeScreen.kt index e2356dc8..4bff72fc 100644 --- a/app/src/main/java/com/rousecontext/app/ui/screens/WelcomeScreen.kt +++ b/app/src/main/java/com/rousecontext/app/ui/screens/WelcomeScreen.kt @@ -1,6 +1,5 @@ package com.rousecontext.app.ui.screens -import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize @@ -8,6 +7,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.widthIn import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Hub import androidx.compose.material3.Button @@ -18,9 +18,11 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.rousecontext.app.ui.theme.AmberAccent import com.rousecontext.app.ui.theme.RouseContextTheme @Composable @@ -30,35 +32,38 @@ fun WelcomeScreen(onGetStarted: () -> Unit = {}) { modifier = Modifier .fillMaxSize() .padding(32.dp), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.Center + horizontalAlignment = Alignment.CenterHorizontally ) { + Spacer(modifier = Modifier.weight(1f)) + Icon( imageVector = Icons.Default.Hub, contentDescription = "Rouse Context", - modifier = Modifier.size(80.dp), - tint = MaterialTheme.colorScheme.primary + modifier = Modifier.size(108.dp), + tint = AmberAccent ) Spacer(modifier = Modifier.height(32.dp)) Text( text = "Rouse Context", - style = MaterialTheme.typography.headlineLarge + style = MaterialTheme.typography.headlineLarge, + fontWeight = FontWeight.SemiBold ) Spacer(modifier = Modifier.height(16.dp)) Text( text = "Turn your phone into a secure AI context server. " + - "Your data stays on your device — AI clients connect " + + "Your data stays on your device \u2014 AI clients connect " + "through an encrypted tunnel.", style = MaterialTheme.typography.bodyLarge, textAlign = TextAlign.Center, - color = MaterialTheme.colorScheme.onSurfaceVariant + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.widthIn(max = 280.dp) ) - Spacer(modifier = Modifier.height(48.dp)) + Spacer(modifier = Modifier.weight(0.6f)) Button( onClick = onGetStarted, @@ -66,6 +71,8 @@ fun WelcomeScreen(onGetStarted: () -> Unit = {}) { ) { Text("Get Started") } + + Spacer(modifier = Modifier.height(24.dp)) } } } diff --git a/app/src/main/java/com/rousecontext/app/ui/theme/Theme.kt b/app/src/main/java/com/rousecontext/app/ui/theme/Theme.kt index b17a8d70..d198ae4e 100644 --- a/app/src/main/java/com/rousecontext/app/ui/theme/Theme.kt +++ b/app/src/main/java/com/rousecontext/app/ui/theme/Theme.kt @@ -8,14 +8,16 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color // Brand colors -val TealPrimary = Color(0xFF1D9E75) // interactive/action color +val TealPrimary = Color(0xFF1D9E75) // interactive/action color val TealLight = Color(0xFF5DCAA5) val TealDeep = Color(0xFF0F6E56) -val AmberAccent = Color(0xFFEF9F27) // brand accent, highlights, indicators +val AmberAccent = Color(0xFFEF9F27) // brand accent, highlights, indicators val AmberDark = Color(0xFFBA7517) -val BackgroundNavy = Color(0xFF0A1628) // primary dark surface +val BackgroundNavy = Color(0xFF0A1628) // primary dark surface val BackgroundBlack = Color(0xFF111111) -val WarmWhite = Color(0xFFFAF8F4) // light mode background +val WarmWhite = Color(0xFFFAF8F4) // light mode background +val WarningContainer = Color(0xFF3A2800) // dark warning card background +val OnWarningContainer = Color(0xFFFFE0A0) // warning card text private val DarkColorScheme = darkColorScheme( primary = TealPrimary, @@ -37,7 +39,7 @@ private val DarkColorScheme = darkColorScheme( error = Color(0xFFFF6B6B), onError = Color.Black, outline = Color(0xFF3A4A5A), - outlineVariant = Color(0xFF2A3A4A), + outlineVariant = Color(0xFF2A3A4A) ) private val LightColorScheme = lightColorScheme( @@ -60,7 +62,7 @@ private val LightColorScheme = lightColorScheme( error = Color(0xFFBA1A1A), onError = Color.White, outline = Color(0xFF6F7973), - outlineVariant = Color(0xFFBFC9C2), + outlineVariant = Color(0xFFBFC9C2) ) @Composable @@ -69,6 +71,6 @@ fun RouseContextTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Comp MaterialTheme( colorScheme = colorScheme, - content = content, + content = content ) }