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))
Column(modifier = Modifier.weight(1f)) {
// Верхняя строка: название + badge
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
// Заголовок
Text(
text = "Requests",
fontWeight = FontWeight.SemiBold,
fontSize = 16.sp,
color = titleColor,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f)
overflow = TextOverflow.Ellipsis
)
// 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) {
Spacer(modifier = Modifier.width(8.dp))
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
)
}
}
}
}
}