Compare commits

..

No commits in common. "dea379e237a13b2f62a39679dbb35922b7a9dc1d" and "10ece6d72f0adb1f74308a9c328705236ca944e8" have entirely different histories.

2 changed files with 14 additions and 16 deletions

View file

@ -395,12 +395,12 @@ fun MessageRow(
} }
if (!message.streaming) { if (!message.streaming) {
Row( Row(
Modifier.padding(top = 6.dp, end = 4.dp), Modifier.padding(top = 4.dp, end = 4.dp),
horizontalArrangement = Arrangement.spacedBy(4.dp), horizontalArrangement = Arrangement.spacedBy(2.dp),
) { ) {
MessageActionButton( MessageActionButton(
icon = if (copied) KaizenIcons.Check else KaizenIcons.Copy, icon = if (copied) KaizenIcons.Check else KaizenIcons.Copy,
tint = if (copied) Color(0xFF10B981) else cs.onSurfaceVariant.copy(alpha = 0.50f), tint = if (copied) Color(0xFF10B981) else cs.onSurfaceVariant.copy(alpha = 0.35f),
) { ) {
haptics.tick() haptics.tick()
copied = true copied = true
@ -411,7 +411,7 @@ fun MessageRow(
} }
} }
onDelete?.let { del -> onDelete?.let { del ->
MessageActionButton(KaizenIcons.Trash, Color(0xFFEF4444).copy(alpha = 0.70f)) { MessageActionButton(KaizenIcons.Trash, Color(0xFFEF4444).copy(alpha = 0.6f)) {
haptics.tick(); del(message.wireId) haptics.tick(); del(message.wireId)
} }
} }
@ -448,12 +448,12 @@ fun MessageRow(
} }
if (!message.streaming && !message.thinking && message.content.isNotBlank()) { if (!message.streaming && !message.thinking && message.content.isNotBlank()) {
Row( Row(
Modifier.padding(start = 38.dp, top = 6.dp), Modifier.padding(start = 38.dp, top = 4.dp),
horizontalArrangement = Arrangement.spacedBy(4.dp), horizontalArrangement = Arrangement.spacedBy(2.dp),
) { ) {
MessageActionButton( MessageActionButton(
icon = if (copied) KaizenIcons.Check else KaizenIcons.Copy, icon = if (copied) KaizenIcons.Check else KaizenIcons.Copy,
tint = if (copied) Color(0xFF10B981) else cs.onSurfaceVariant.copy(alpha = 0.50f), tint = if (copied) Color(0xFF10B981) else cs.onSurfaceVariant.copy(alpha = 0.35f),
) { ) {
haptics.tick() haptics.tick()
copied = true copied = true
@ -466,18 +466,18 @@ fun MessageRow(
onReadAloud?.let { readAloud -> onReadAloud?.let { readAloud ->
MessageActionButton( MessageActionButton(
icon = KaizenIcons.Volume2, icon = KaizenIcons.Volume2,
tint = if (isPlayingTts) accent.primary else cs.onSurfaceVariant.copy(alpha = 0.50f), tint = if (isPlayingTts) accent.primary else cs.onSurfaceVariant.copy(alpha = 0.35f),
) { ) {
haptics.tick(); readAloud(message.content) haptics.tick(); readAloud(message.content)
} }
} }
onRegenerate?.let { regen -> onRegenerate?.let { regen ->
MessageActionButton(KaizenIcons.RefreshCw, cs.onSurfaceVariant.copy(alpha = 0.50f)) { MessageActionButton(KaizenIcons.RefreshCw, cs.onSurfaceVariant.copy(alpha = 0.35f)) {
haptics.tick(); regen(message.wireId) haptics.tick(); regen(message.wireId)
} }
} }
onDelete?.let { del -> onDelete?.let { del ->
MessageActionButton(KaizenIcons.Trash, Color(0xFFEF4444).copy(alpha = 0.70f)) { MessageActionButton(KaizenIcons.Trash, Color(0xFFEF4444).copy(alpha = 0.6f)) {
haptics.tick(); del(message.wireId) haptics.tick(); del(message.wireId)
} }
} }
@ -489,16 +489,14 @@ fun MessageRow(
@Composable @Composable
private fun MessageActionButton(icon: ImageVector, tint: Color, onClick: () -> Unit) { private fun MessageActionButton(icon: ImageVector, tint: Color, onClick: () -> Unit) {
val isDark = isSystemInDarkTheme()
Box( Box(
Modifier Modifier
.size(34.dp) .size(30.dp)
.clip(KaizenShapes.sm) .clip(KaizenShapes.circle)
.background(if (isDark) Color(0x0AFFFFFF) else Color(0x06000000))
.clickable(onClick = onClick), .clickable(onClick = onClick),
contentAlignment = Alignment.Center, contentAlignment = Alignment.Center,
) { ) {
Icon(icon, null, tint = tint, modifier = Modifier.size(17.dp)) Icon(icon, null, tint = tint, modifier = Modifier.size(16.dp))
} }
} }

View file

@ -761,7 +761,7 @@ fun ChatScreen(
start = 16.dp, start = 16.dp,
end = 16.dp end = 16.dp
), ),
verticalArrangement = Arrangement.spacedBy(24.dp), verticalArrangement = Arrangement.spacedBy(16.dp),
) { ) {
items(messages, key = { it.id }) { message -> items(messages, key = { it.id }) { message ->
MessageRow( MessageRow(