个人信息页和用户信息页UI调整
This commit is contained in:
@@ -318,41 +318,40 @@ fun ProfileV3(
|
||||
}
|
||||
) {
|
||||
// banner
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(bannerHeight.dp)
|
||||
.background(AppColors.profileBackground)
|
||||
) {
|
||||
val banner = profile?.banner
|
||||
if (banner != null) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(bannerHeight.dp - 24.dp)
|
||||
.let {
|
||||
if (isSelf&&isMain) {
|
||||
it.noRippleClickable {
|
||||
Intent(Intent.ACTION_PICK).apply {
|
||||
type = "image/*"
|
||||
pickBannerImageLauncher.launch(
|
||||
this
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
.shadow(
|
||||
elevation = 6.dp,
|
||||
shape = RoundedCornerShape(
|
||||
bottomStart = 32.dp,
|
||||
bottomEnd = 32.dp
|
||||
),
|
||||
)
|
||||
.height(bannerHeight.dp)
|
||||
.background(AppColors.profileBackground)
|
||||
) {
|
||||
val banner = profile?.banner
|
||||
|
||||
if (banner != null) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(bannerHeight.dp - 24.dp)
|
||||
.let {
|
||||
if (isSelf&&isMain) {
|
||||
it.noRippleClickable {
|
||||
Intent(Intent.ACTION_PICK).apply {
|
||||
type = "image/*"
|
||||
pickBannerImageLauncher.launch(
|
||||
this
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
.shadow(
|
||||
elevation = 6.dp,
|
||||
shape = RoundedCornerShape(
|
||||
bottomStart = 32.dp,
|
||||
bottomEnd = 32.dp
|
||||
),
|
||||
)
|
||||
) {
|
||||
CustomAsyncImage(
|
||||
LocalContext.current,
|
||||
banner,
|
||||
@@ -361,18 +360,12 @@ fun ProfileV3(
|
||||
contentDescription = "",
|
||||
contentScale = ContentScale.Crop
|
||||
)
|
||||
} else {
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.rave_now_profile_backgrount_demo_1),
|
||||
modifier = Modifier
|
||||
.fillMaxSize(),
|
||||
contentDescription = "",
|
||||
contentScale = ContentScale.Crop
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
Spacer(modifier = Modifier.height(100.dp))
|
||||
}
|
||||
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
@@ -478,6 +471,8 @@ fun ProfileV3(
|
||||
|
||||
|
||||
}
|
||||
|
||||
//顶部导航栏
|
||||
Box(modifier = Modifier.fillMaxWidth()) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
|
||||
@@ -50,8 +50,8 @@ fun OtherProfileAction(
|
||||
// 定义渐变色
|
||||
val followGradient = Brush.horizontalGradient(
|
||||
colors = listOf(
|
||||
Color(0xFFE53E3E), // 红色
|
||||
Color(0xFF9F7AEA) // 紫色
|
||||
Color(0xFF7c45ed),
|
||||
Color(0x777c68ef)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -100,7 +100,7 @@ fun OtherProfileAction(
|
||||
Text(
|
||||
text = if (profile.isFollowing) "已关注" else stringResource(R.string.follow_upper),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
fontWeight = FontWeight.W900,
|
||||
color = if (profile.isFollowing) {
|
||||
// 已关注状态 - 灰色文字
|
||||
AppColors.text.copy(alpha = 0.6f)
|
||||
@@ -133,11 +133,37 @@ fun OtherProfileAction(
|
||||
Text(
|
||||
text = stringResource(R.string.chat_upper),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
fontWeight = FontWeight.W900,
|
||||
color = AppColors.text, // 使用主题文字颜色
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 分享按钮 - 灰色背景样式
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(AppColors.nonActive)
|
||||
.padding(horizontal = 16.dp, vertical = 12.dp)
|
||||
.noRippleClickable {
|
||||
// 检查游客模式,如果是游客则跳转登录
|
||||
if (GuestLoginCheckOut.needLogin(GuestLoginCheckOutScene.CHAT_WITH_AGENT)) {
|
||||
navController.navigate(NavigationRoute.Login.route)
|
||||
} else {
|
||||
// TODO: 添加分享逻辑
|
||||
}
|
||||
}
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.share),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W900,
|
||||
color = AppColors.text, // 使用主题文字颜色
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,11 +29,13 @@ import com.aiosman.ravenow.ui.modifiers.noRippleClickable
|
||||
@Composable
|
||||
fun SelfProfileAction(
|
||||
onEditProfile: () -> Unit,
|
||||
onPremiumClick: (() -> Unit)? = null
|
||||
onPremiumClick: (() -> Unit),
|
||||
onShare: (() -> Unit)? = null
|
||||
) {
|
||||
val AppColors = LocalAppTheme.current
|
||||
val editProfileDebouncer = rememberDebouncer()
|
||||
val premiumClickDebouncer = rememberDebouncer()
|
||||
val shareDebouncer = rememberDebouncer()
|
||||
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
@@ -46,7 +48,7 @@ fun SelfProfileAction(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.clip(RoundedCornerShape(18.dp))
|
||||
.background(AppColors.nonActive)
|
||||
.padding(horizontal = 16.dp, vertical = 12.dp)
|
||||
.noRippleClickable {
|
||||
@@ -63,34 +65,57 @@ fun SelfProfileAction(
|
||||
)
|
||||
}
|
||||
|
||||
// Rave Premium 按钮(右侧)
|
||||
// 分享按钮
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(AppColors.premiumBackground)
|
||||
.clip(RoundedCornerShape(18.dp))
|
||||
.background(AppColors.nonActive)
|
||||
.padding(horizontal = 16.dp, vertical = 12.dp)
|
||||
.noRippleClickable {
|
||||
premiumClickDebouncer {
|
||||
onPremiumClick?.invoke()
|
||||
shareDebouncer {
|
||||
// TODO: 添加分享逻辑
|
||||
}
|
||||
}
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.ic_member),
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(18.dp),
|
||||
colorFilter = ColorFilter.tint(AppColors.premiumText)
|
||||
)
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
Text(
|
||||
text = "Rave Premium",
|
||||
text = stringResource(R.string.share),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
color = AppColors.premiumText,
|
||||
color = AppColors.text,
|
||||
)
|
||||
}
|
||||
|
||||
// // Rave Premium 按钮(右侧)
|
||||
// Row(
|
||||
// verticalAlignment = Alignment.CenterVertically,
|
||||
// horizontalArrangement = Arrangement.Center,
|
||||
// modifier = Modifier
|
||||
// .weight(1f)
|
||||
// .clip(RoundedCornerShape(8.dp))
|
||||
// .background(AppColors.premiumBackground)
|
||||
// .padding(horizontal = 16.dp, vertical = 12.dp)
|
||||
// .noRippleClickable {
|
||||
// premiumClickDebouncer {
|
||||
// onPremiumClick?.invoke()
|
||||
// }
|
||||
// }
|
||||
// ) {
|
||||
// Image(
|
||||
// painter = painterResource(id = R.drawable.ic_member),
|
||||
// contentDescription = "",
|
||||
// modifier = Modifier.size(18.dp),
|
||||
// colorFilter = ColorFilter.tint(AppColors.premiumText)
|
||||
// )
|
||||
// Spacer(modifier = Modifier.width(8.dp))
|
||||
// Text(
|
||||
// text = "Rave Premium",
|
||||
// fontSize = 14.sp,
|
||||
// fontWeight = FontWeight.W600,
|
||||
// color = AppColors.premiumText,
|
||||
// )
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<string name="empty_my_post_title">まだ投稿がありません</string>
|
||||
<string name="empty_my_post_content">今すぐモーメントを投稿</string>
|
||||
<string name="edit_profile">プロフィールを編集</string>
|
||||
<string name="share">シェア</string>
|
||||
<string name="logout">ログアウト</string>
|
||||
<string name="change_password">パスワードを変更</string>
|
||||
<string name="current_password_tip1">現在のパスワードを入力してください</string>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<string name="empty_my_post_title">还没有发布任何动态</string>
|
||||
<string name="empty_my_post_content">发布一个动态吧</string>
|
||||
<string name="edit_profile">编辑个人资料</string>
|
||||
<string name="share">分享</string>
|
||||
<string name="logout">登出</string>
|
||||
<string name="change_password">修改密码</string>
|
||||
<string name="current_password_tip1">请输入当前密码</string>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<string name="empty_my_post_title">You haven\'t left any tracks yet</string>
|
||||
<string name="empty_my_post_content">Post a moment now</string>
|
||||
<string name="edit_profile">Edit profile</string>
|
||||
<string name="share">share</string>
|
||||
<string name="logout">Logout</string>
|
||||
<string name="change_password">Change password</string>
|
||||
<string name="current_password_tip1">Please enter your current password</string>
|
||||
|
||||
Reference in New Issue
Block a user