feat: refactor RequestsSection header layout and reposition badge display

This commit is contained in:
2026-02-13 23:24:13 +05:00
parent 815ffa478b
commit e399fd04aa

View File

@@ -3190,23 +3190,30 @@ fun RequestsSection(
Spacer(modifier = Modifier.width(12.dp)) Spacer(modifier = Modifier.width(12.dp))
Column(modifier = Modifier.weight(1f)) { Column(modifier = Modifier.weight(1f)) {
// Верхняя строка: название + badge // Заголовок
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Text( Text(
text = "Requests", text = "Requests",
fontWeight = FontWeight.SemiBold, fontWeight = FontWeight.SemiBold,
fontSize = 16.sp, fontSize = 16.sp,
color = titleColor, color = titleColor,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis
modifier = Modifier.weight(1f)
) )
// Badge справа на уровне заголовка // Нижняя строка: subtitle (последний запрос)
if (subtitle.isNotEmpty()) {
Spacer(modifier = Modifier.height(4.dp))
Text(
text = subtitle,
fontSize = 14.sp,
color = subtitleColor,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
}
}
// Badge — вертикально отцентрирован в строке
if (count > 0) { if (count > 0) {
Spacer(modifier = Modifier.width(8.dp)) Spacer(modifier = Modifier.width(8.dp))
Box( Box(
@@ -3228,20 +3235,6 @@ fun RequestsSection(
} }
} }
} }
// Нижняя строка: subtitle (последний запрос)
if (subtitle.isNotEmpty()) {
Spacer(modifier = Modifier.height(4.dp))
Text(
text = subtitle,
fontSize = 14.sp,
color = subtitleColor,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
}
}
}
} }
} }