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