@@ -18,7 +18,6 @@ import ai.openclaw.app.ui.design.ClawStatusPill
1818import ai.openclaw.app.ui.design.ClawTextField
1919import ai.openclaw.app.ui.design.ClawTheme
2020import androidx.compose.foundation.BorderStroke
21- import androidx.compose.foundation.background
2221import androidx.compose.foundation.layout.Arrangement
2322import androidx.compose.foundation.layout.Box
2423import androidx.compose.foundation.layout.Column
@@ -60,7 +59,6 @@ import androidx.compose.runtime.remember
6059import androidx.compose.runtime.setValue
6160import androidx.compose.ui.Alignment
6261import androidx.compose.ui.Modifier
63- import androidx.compose.ui.draw.clip
6462import androidx.compose.ui.graphics.Color
6563import androidx.compose.ui.graphics.vector.ImageVector
6664import androidx.compose.ui.text.style.TextOverflow
@@ -111,7 +109,7 @@ internal fun V2SettingsDetailScreen(
111109 V2SettingsRoute .Gateway -> V2GatewaySettingsScreen (viewModel = viewModel, onBack = onBack)
112110 V2SettingsRoute .Appearance -> V2AppearanceSettingsScreen (onBack = onBack)
113111 V2SettingsRoute .Health -> V2HealthLogsSettingsScreen (viewModel = viewModel, onBack = onBack)
114- V2SettingsRoute .About -> V2AboutSettingsScreen (onBack = onBack)
112+ V2SettingsRoute .About -> V2AboutSettingsScreen (viewModel = viewModel, onBack = onBack)
115113 }
116114}
117115
@@ -456,22 +454,72 @@ private fun V2AppearanceSettingsScreen(onBack: () -> Unit) {
456454}
457455
458456@Composable
459- private fun V2AboutSettingsScreen (onBack : () -> Unit ) {
457+ private fun V2AboutSettingsScreen (
458+ viewModel : MainViewModel ,
459+ onBack : () -> Unit ,
460+ ) {
461+ val isConnected by viewModel.isConnected.collectAsState()
462+ val serverName by viewModel.serverName.collectAsState()
463+ val gatewayVersion by viewModel.gatewayVersion.collectAsState()
464+ val updateAvailable by viewModel.gatewayUpdateAvailable.collectAsState()
465+ val latestVersion = updateAvailable?.latestVersion?.takeIf { it.isNotBlank() }
466+ val currentGatewayVersion = updateAvailable?.currentVersion?.takeIf { it.isNotBlank() } ? : gatewayVersion
467+
460468 V2SettingsDetailFrame (title = " About" , subtitle = " OpenClaw for Android." , icon = Icons .Default .Info , onBack = onBack) {
461469 V2SettingsMetricPanel (
462470 rows =
463471 listOf (
464- V2SettingsMetric (" Version " , BuildConfig .VERSION_NAME ),
472+ V2SettingsMetric (" Android App " , BuildConfig .VERSION_NAME ),
465473 V2SettingsMetric (" Build" , BuildConfig .VERSION_CODE .toString()),
466474 V2SettingsMetric (" Channel" , " Play" ),
475+ V2SettingsMetric (" Gateway" , currentGatewayVersion ? : " Not connected" ),
467476 ),
468477 )
478+ ClawPanel (contentPadding = PaddingValues (horizontal = 0 .dp, vertical = 0 .dp)) {
479+ Column {
480+ V2AboutStatusRow (title = " Gateway" , value = serverName?.takeIf { it.isNotBlank() } ? : " Home Gateway" , healthy = isConnected)
481+ HorizontalDivider (color = ClawTheme .colors.border, thickness = 1 .dp)
482+ V2AboutStatusRow (title = " Runtime" , value = currentGatewayVersion ? : " Waiting" , healthy = currentGatewayVersion != null )
483+ HorizontalDivider (color = ClawTheme .colors.border, thickness = 1 .dp)
484+ V2AboutStatusRow (
485+ title = " Update" ,
486+ value = latestVersion?.let { " v$it available" } ? : " Up to date" ,
487+ healthy = latestVersion == null ,
488+ )
489+ }
490+ }
469491 ClawPanel {
470- Text (text = " OpenClaw turns this phone into a clean mobile command surface for your sessions, voice, providers, and Gateway." , style = ClawTheme .type.body, color = ClawTheme .colors.textMuted)
492+ Text (text = aboutUpdateText(latestVersion = latestVersion), style = ClawTheme .type.body, color = ClawTheme .colors.textMuted)
493+ }
494+ }
495+ }
496+
497+ @Composable
498+ private fun V2AboutStatusRow (
499+ title : String ,
500+ value : String ,
501+ healthy : Boolean ,
502+ ) {
503+ Row (
504+ modifier = Modifier .fillMaxWidth().padding(horizontal = 10 .dp, vertical = 7 .dp),
505+ verticalAlignment = Alignment .CenterVertically ,
506+ horizontalArrangement = Arrangement .spacedBy(9 .dp),
507+ ) {
508+ Column (modifier = Modifier .weight(1f ), verticalArrangement = Arrangement .spacedBy(1 .dp)) {
509+ Text (text = title, style = ClawTheme .type.body, color = ClawTheme .colors.text, maxLines = 1 )
510+ Text (text = value, style = ClawTheme .type.caption, color = ClawTheme .colors.textMuted, maxLines = 1 , overflow = TextOverflow .Ellipsis )
471511 }
512+ ClawStatusPill (text = if (healthy) " OK" else " Check" , status = if (healthy) ClawStatus .Success else ClawStatus .Warning )
472513 }
473514}
474515
516+ private fun aboutUpdateText (latestVersion : String? ): String =
517+ if (latestVersion == null ) {
518+ " OpenClaw turns this phone into a clean mobile command surface for sessions, voice, providers, and Gateway."
519+ } else {
520+ " A Gateway update is available. Run the update from the Web UI or CLI when you are ready."
521+ }
522+
475523@Composable
476524internal fun V2SettingsDetailFrame (
477525 title : String ,
@@ -810,24 +858,6 @@ internal fun V2SettingsMetricPanel(rows: List<V2SettingsMetric>) {
810858 }
811859}
812860
813- @Composable
814- private fun V2HealthRow (
815- title : String ,
816- value : String ,
817- healthy : Boolean ,
818- ) {
819- ClawPanel (contentPadding = PaddingValues (horizontal = 10 .dp, vertical = 8 .dp)) {
820- Row (modifier = Modifier .fillMaxWidth(), verticalAlignment = Alignment .CenterVertically , horizontalArrangement = Arrangement .spacedBy(8 .dp)) {
821- Box (modifier = Modifier .size(7 .dp).clip(CircleShape ).background(if (healthy) ClawTheme .colors.success else ClawTheme .colors.warning))
822- Column (modifier = Modifier .weight(1f ), verticalArrangement = Arrangement .spacedBy(2 .dp)) {
823- Text (text = title, style = ClawTheme .type.section, color = ClawTheme .colors.text)
824- Text (text = value, style = ClawTheme .type.body, color = ClawTheme .colors.textMuted, maxLines = 2 , overflow = TextOverflow .Ellipsis )
825- }
826- ClawStatusPill (text = if (healthy) " OK" else " Check" , status = if (healthy) ClawStatus .Success else ClawStatus .Warning )
827- }
828- }
829- }
830-
831861@Composable
832862private fun V2SettingsBackButton (onClick : () -> Unit ) {
833863 Surface (onClick = onClick, modifier = Modifier .size(30 .dp), shape = CircleShape , color = Color .Transparent , contentColor = ClawTheme .colors.text) {
0 commit comments