Профиль, редактирование без аватара
This commit is contained in:
@@ -17,6 +17,7 @@ import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import coil.compose.AsyncImage
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import core.presentation.theme.SoftSquareShape
|
||||
|
||||
@Composable
|
||||
@@ -45,10 +46,14 @@ fun AppAvatar(
|
||||
|
||||
val avatarColor = Color(0xFF4AA6F3) // Premium Telegram Blue (Web)
|
||||
|
||||
val cornerRadius = remember(size) {
|
||||
if (size <= 32.dp) (size.value * 0.25).dp else 12.dp
|
||||
}
|
||||
|
||||
Box(
|
||||
modifier = modifier
|
||||
.size(size)
|
||||
.clip(SoftSquareShape)
|
||||
.clip(RoundedCornerShape(cornerRadius))
|
||||
.background(avatarColor),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
|
||||
@@ -130,17 +130,11 @@ private fun RowScope.ProfileNavItem(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(26.dp)
|
||||
.clip(CircleShape)
|
||||
) {
|
||||
AppAvatar(
|
||||
url = avatarUrl,
|
||||
name = username,
|
||||
size = 26.dp
|
||||
)
|
||||
}
|
||||
AppAvatar(
|
||||
url = avatarUrl,
|
||||
name = username,
|
||||
size = 26.dp
|
||||
)
|
||||
Text(
|
||||
text = stringResource(R.string.profile_tab),
|
||||
color = contentColor,
|
||||
|
||||
Reference in New Issue
Block a user