Merge pull request #136 from joaodematejr/fix-sidebar-text

fix: update sidebar text to use string resources
This commit is contained in:
callebtc
2025-07-18 00:01:29 +02:00
committed by GitHub
2 changed files with 8 additions and 7 deletions
@@ -1,8 +1,7 @@
package com.bitchat.android.ui package com.bitchat.android.ui
import com.bitchat.android.R
import android.util.Log import android.util.Log
import androidx.compose.animation.*
import androidx.compose.animation.core.*
import androidx.compose.foundation.* import androidx.compose.foundation.*
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyColumn
@@ -16,11 +15,12 @@ import androidx.compose.runtime.livedata.observeAsState
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.compose.ui.zIndex
/** /**
* Sidebar components for ChatScreen * Sidebar components for ChatScreen
@@ -140,7 +140,7 @@ private fun SidebarHeader() {
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
Text( Text(
text = "YOUR NETWORK", text = stringResource(id = R.string.your_network).uppercase(),
style = MaterialTheme.typography.titleMedium.copy( style = MaterialTheme.typography.titleMedium.copy(
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
fontFamily = FontFamily.Monospace fontFamily = FontFamily.Monospace
@@ -175,7 +175,7 @@ fun ChannelsSection(
) )
Spacer(modifier = Modifier.width(6.dp)) Spacer(modifier = Modifier.width(6.dp))
Text( Text(
text = "CHANNELS", text = stringResource(id = R.string.channels).uppercase(),
style = MaterialTheme.typography.labelSmall, style = MaterialTheme.typography.labelSmall,
color = colorScheme.onSurface.copy(alpha = 0.6f), color = colorScheme.onSurface.copy(alpha = 0.6f),
fontWeight = FontWeight.Bold fontWeight = FontWeight.Bold
@@ -255,7 +255,7 @@ fun PeopleSection(
) )
Spacer(modifier = Modifier.width(6.dp)) Spacer(modifier = Modifier.width(6.dp))
Text( Text(
text = "PEOPLE", text = stringResource(id = R.string.people).uppercase(),
style = MaterialTheme.typography.labelSmall, style = MaterialTheme.typography.labelSmall,
color = colorScheme.onSurface.copy(alpha = 0.6f), color = colorScheme.onSurface.copy(alpha = 0.6f),
fontWeight = FontWeight.Bold fontWeight = FontWeight.Bold
@@ -264,7 +264,7 @@ fun PeopleSection(
if (connectedPeers.isEmpty()) { if (connectedPeers.isEmpty()) {
Text( Text(
text = "No one connected", text = stringResource(id = R.string.no_one_connected),
style = MaterialTheme.typography.bodyMedium, style = MaterialTheme.typography.bodyMedium,
color = colorScheme.onSurface.copy(alpha = 0.5f), color = colorScheme.onSurface.copy(alpha = 0.5f),
modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp) modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp)
+1
View File
@@ -16,4 +16,5 @@
<string name="online_users">Online Users</string> <string name="online_users">Online Users</string>
<string name="no_one_connected">No one connected</string> <string name="no_one_connected">No one connected</string>
<string name="emergency_clear_hint">Triple tap to clear all data</string> <string name="emergency_clear_hint">Triple tap to clear all data</string>
<string name="your_network">Your Network</string>
</resources> </resources>