This commit is contained in:
callebtc
2025-07-12 02:34:56 +02:00
parent 9b57504c2c
commit 83da8f3b1b
3 changed files with 20 additions and 15 deletions
@@ -278,7 +278,15 @@ private fun ChannelHeader(
horizontalArrangement = Arrangement.SpaceBetween, horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
IconButton(onClick = onBackClick) { // Use same back button style as DM header (Button instead of IconButton)
Button(
onClick = onBackClick,
colors = ButtonDefaults.buttonColors(
containerColor = Color.Transparent,
contentColor = colorScheme.primary
),
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 4.dp)
) {
Row( Row(
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
@@ -299,10 +307,11 @@ private fun ChannelHeader(
Spacer(modifier = Modifier.weight(1f)) Spacer(modifier = Modifier.weight(1f))
// Centered title with orange color to match DM input field
Text( Text(
text = "channel: $channel", text = "channel: $channel",
style = MaterialTheme.typography.titleMedium, style = MaterialTheme.typography.titleMedium,
color = Color(0xFF0080FF), // Blue color = Color(0xFFFF8C00), // Orange to match input field
modifier = Modifier.clickable { onSidebarClick() } modifier = Modifier.clickable { onSidebarClick() }
) )
@@ -44,17 +44,13 @@ fun MessageInput(
modifier = modifier.padding(horizontal = 12.dp, vertical = 8.dp), // Reduced padding modifier = modifier.padding(horizontal = 12.dp, vertical = 8.dp), // Reduced padding
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
// Fixed: Remove arrow from private message input // Remove arrow from both private and channel inputs to match DM style
Text( Text(
text = when { text = "<@$nickname>", // No arrow for both private and channel
selectedPrivatePeer != null -> "<@$nickname>" // Removed arrow for private
currentChannel != null -> "<@$nickname> →" // Keep arrow for channels
else -> "<@$nickname>"
},
style = MaterialTheme.typography.bodySmall.copy(fontWeight = FontWeight.Medium), style = MaterialTheme.typography.bodySmall.copy(fontWeight = FontWeight.Medium),
color = when { color = when {
selectedPrivatePeer != null -> Color(0xFFFF8C00) // Orange for private selectedPrivatePeer != null -> Color(0xFFFF8C00) // Orange for private
currentChannel != null -> Color(0xFFFF8C00) // Orange if encrypted channel currentChannel != null -> Color(0xFFFF8C00) // Orange for channels too
else -> colorScheme.primary else -> colorScheme.primary
}, },
fontFamily = FontFamily.Monospace fontFamily = FontFamily.Monospace
@@ -78,7 +74,7 @@ fun MessageInput(
Spacer(modifier = Modifier.width(8.dp)) // Reduced spacing Spacer(modifier = Modifier.width(8.dp)) // Reduced spacing
// Fixed: Make send button orange in private mode to match nickname color // Update send button to match input field colors
IconButton( IconButton(
onClick = onSend, onClick = onSend,
modifier = Modifier.size(32.dp) modifier = Modifier.size(32.dp)
@@ -87,8 +83,8 @@ fun MessageInput(
modifier = Modifier modifier = Modifier
.size(30.dp) .size(30.dp)
.background( .background(
color = if (selectedPrivatePeer != null) { color = if (selectedPrivatePeer != null || currentChannel != null) {
// Orange for private messages to match nickname color // Orange for both private messages and channels to match nickname color
Color(0xFFFF8C00).copy(alpha = 0.75f) Color(0xFFFF8C00).copy(alpha = 0.75f)
} else if (colorScheme.background == Color.Black) { } else if (colorScheme.background == Color.Black) {
Color(0xFF00FF00).copy(alpha = 0.75f) // Bright green for dark theme Color(0xFF00FF00).copy(alpha = 0.75f) // Bright green for dark theme
@@ -103,8 +99,8 @@ fun MessageInput(
imageVector = Icons.Filled.KeyboardArrowUp, imageVector = Icons.Filled.KeyboardArrowUp,
contentDescription = "Send message", contentDescription = "Send message",
modifier = Modifier.size(20.dp), modifier = Modifier.size(20.dp),
tint = if (selectedPrivatePeer != null) { tint = if (selectedPrivatePeer != null || currentChannel != null) {
// Black arrow on orange in private mode // Black arrow on orange for both private and channel modes
Color.Black Color.Black
} else if (colorScheme.background == Color.Black) { } else if (colorScheme.background == Color.Black) {
Color.Black // Black arrow on bright green in dark theme Color.Black // Black arrow on bright green in dark theme
@@ -193,7 +193,7 @@ fun ChannelsSection(
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
Text( Text(
text = "#$channel", text = channel, // Channel already contains the # prefix
style = MaterialTheme.typography.bodyMedium, style = MaterialTheme.typography.bodyMedium,
color = if (isSelected) colorScheme.primary else colorScheme.onSurface, color = if (isSelected) colorScheme.primary else colorScheme.onSurface,
fontWeight = if (isSelected) FontWeight.Medium else FontWeight.Normal, fontWeight = if (isSelected) FontWeight.Medium else FontWeight.Normal,