fix: make Message and ApprovalRequest text containers scrollable and remove Acknowledge button from loading screens

This commit is contained in:
2026-07-04 15:58:54 -06:00
parent 6aab0b2ac7
commit 107f5fee32

View File

@@ -304,8 +304,10 @@ fun ApprovalRequestComponent(
Box( Box(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.weight(1f, fill = false)
.background(DeepBg, RoundedCornerShape(12.dp)) .background(DeepBg, RoundedCornerShape(12.dp))
.border(1.dp, Color.White.copy(alpha = 0.1f), RoundedCornerShape(12.dp)) .border(1.dp, Color.White.copy(alpha = 0.1f), RoundedCornerShape(12.dp))
.verticalScroll(rememberScrollState())
.padding(12.dp) .padding(12.dp)
) { ) {
Text( Text(
@@ -459,8 +461,10 @@ fun MessageComponent(
Box( Box(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.weight(1f, fill = false)
.background(DeepBg, RoundedCornerShape(12.dp)) .background(DeepBg, RoundedCornerShape(12.dp))
.border(1.dp, Color.White.copy(alpha = 0.1f), RoundedCornerShape(12.dp)) .border(1.dp, Color.White.copy(alpha = 0.1f), RoundedCornerShape(12.dp))
.verticalScroll(rememberScrollState())
.padding(16.dp) .padding(16.dp)
) { ) {
Text( Text(
@@ -472,21 +476,23 @@ fun MessageComponent(
) )
} }
Button( if (message.primaryAction != null) {
onClick = { onAcknowledge(message.primaryAction?.id) }, Button(
colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.primary), onClick = { onAcknowledge(message.primaryAction?.id) },
shape = RoundedCornerShape(12.dp), colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.primary),
modifier = Modifier shape = RoundedCornerShape(12.dp),
.fillMaxWidth() modifier = Modifier
.height(48.dp), .fillMaxWidth()
enabled = message.primaryAction?.enabled ?: true .height(48.dp),
) { enabled = message.primaryAction?.enabled ?: true
Text( ) {
text = message.primaryAction?.label ?: "Acknowledge", Text(
color = MaterialTheme.colors.background, text = message.primaryAction?.label ?: "Acknowledge",
fontWeight = FontWeight.Bold, color = MaterialTheme.colors.background,
fontSize = 15.sp fontWeight = FontWeight.Bold,
) fontSize = 15.sp
)
}
} }
} }
} }