feat: rounder chat items with card-style borders
Items use KaizenShapes.md (16dp radius) instead of sm (12dp), more spacing (4dp gap), horizontal padding, and subtle glass borders on inactive items. Active items get accent gradient border + shadow. Matches web's rounded-xl card treatment.
This commit is contained in:
parent
558b1be675
commit
10ece6d72f
1 changed files with 22 additions and 15 deletions
|
|
@ -238,7 +238,7 @@ fun KaizenSidebar(
|
|||
val grouped = remember(filteredConversations, labels) { groupConversations(filteredConversations, labels) }
|
||||
LazyColumn(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
verticalArrangement = Arrangement.spacedBy(2.dp)
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp)
|
||||
) {
|
||||
grouped.forEach { (dateGroup, items) ->
|
||||
item(key = "header_$dateGroup") {
|
||||
|
|
@ -433,33 +433,40 @@ private fun HistoryItemRow(
|
|||
|
||||
var showMenu by remember { mutableStateOf(false) }
|
||||
|
||||
val itemBorder = if (selected) {
|
||||
remember(isDark, accent) {
|
||||
if (isDark) Brush.verticalGradient(
|
||||
listOf(accent.primary.copy(alpha = 0.25f), accent.primary.copy(alpha = 0.06f))
|
||||
) else Brush.verticalGradient(
|
||||
listOf(accent.primary.copy(alpha = 0.20f), accent.primary.copy(alpha = 0.05f))
|
||||
)
|
||||
}
|
||||
} else null
|
||||
val activeBorder = remember(isDark, accent) {
|
||||
if (isDark) Brush.verticalGradient(
|
||||
listOf(accent.primary.copy(alpha = 0.25f), accent.primary.copy(alpha = 0.06f))
|
||||
) else Brush.verticalGradient(
|
||||
listOf(accent.primary.copy(alpha = 0.20f), accent.primary.copy(alpha = 0.05f))
|
||||
)
|
||||
}
|
||||
val inactiveBorder = remember(isDark) {
|
||||
if (isDark) Brush.verticalGradient(
|
||||
listOf(Color.White.copy(alpha = 0.07f), Color.White.copy(alpha = 0.02f))
|
||||
) else Brush.verticalGradient(
|
||||
listOf(Color.White.copy(alpha = 0.35f), Color.Black.copy(alpha = 0.03f))
|
||||
)
|
||||
}
|
||||
|
||||
Box {
|
||||
Box(modifier = Modifier.padding(horizontal = 2.dp)) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.clip(KaizenShapes.sm)
|
||||
.clip(KaizenShapes.md)
|
||||
.then(
|
||||
if (selected) {
|
||||
Modifier
|
||||
.kaizenShadow(stack = KaizenShadows.level1, cornerRadius = 10.dp)
|
||||
.kaizenShadow(stack = KaizenShadows.level1, cornerRadius = 16.dp)
|
||||
.background(accent.primary.copy(alpha = if (isDark) 0.12f else 0.08f))
|
||||
.border(0.8.dp, itemBorder!!, KaizenShapes.sm)
|
||||
.border(0.8.dp, activeBorder, KaizenShapes.md)
|
||||
} else {
|
||||
Modifier
|
||||
.background(if (isDark) Color(0x08FFFFFF) else Color(0x05000000))
|
||||
.border(0.5.dp, inactiveBorder, KaizenShapes.md)
|
||||
}
|
||||
)
|
||||
.clickable { onClick() }
|
||||
.padding(start = 10.dp, end = 4.dp, top = 8.dp, bottom = 8.dp),
|
||||
.padding(start = 12.dp, end = 4.dp, top = 10.dp, bottom = 10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
if (item.pinned) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue