我的智能体

This commit is contained in:
weber
2025-08-05 17:01:23 +08:00
parent a944bd0fa3
commit b837c704e5
12 changed files with 177 additions and 95 deletions

View File

@@ -107,6 +107,7 @@ fun ProfileV3(
onChatClick: () -> Unit = {},
moments: List<MomentEntity>,
isSelf: Boolean = true,
isMain:Boolean = false,
onLoadMore: () -> Unit = {},
onLike: (MomentEntity) -> Unit = {},
onComment: (MomentEntity) -> Unit = {},
@@ -274,7 +275,7 @@ fun ProfileV3(
)
}
}
if (isSelf) {
if (isSelf&&isMain) {
Box(
modifier = Modifier
.align(Alignment.TopEnd)
@@ -386,54 +387,57 @@ fun ProfileV3(
),
verticalAlignment = Alignment.CenterVertically
) {
Image(
painter = painterResource(id = R.drawable.rider_pro_back_icon), // Replace with your image resource
contentDescription = "Back",
modifier = Modifier
.noRippleClickable {
navController.navigateUp()
}
.size(24.dp),
colorFilter = ColorFilter.tint(AppColors.text)
)
Spacer(modifier = Modifier.width(8.dp))
CustomAsyncImage(
LocalContext.current,
profile?.avatar,
modifier = Modifier
.size(32.dp)
.clip(CircleShape),
contentDescription = "",
contentScale = ContentScale.Crop
)
Spacer(modifier = Modifier.width(16.dp))
Text(
text = profile?.nickName ?: "",
fontSize = 16.sp,
fontWeight = FontWeight.W600,
color = AppColors.text
)
Spacer(modifier = Modifier.weight(1f))
if (isSelf) {
Box(
modifier = Modifier.noRippleClickable {
IndexViewModel.openDrawer = true
}
) {
Box(
modifier = Modifier
.padding(16.dp)
if (!isMain) {
Image(
painter = painterResource(id = R.drawable.rider_pro_back_icon), // Replace with your image resource
contentDescription = "Back",
modifier = Modifier
.noRippleClickable {
navController.navigateUp()
}
.size(24.dp),
colorFilter = ColorFilter.tint(AppColors.text)
)
Spacer(modifier = Modifier.width(8.dp))
CustomAsyncImage(
LocalContext.current,
profile?.avatar,
modifier = Modifier
.size(32.dp)
.clip(CircleShape),
contentDescription = "",
contentScale = ContentScale.Crop
)
Spacer(modifier = Modifier.width(16.dp))
Text(
text = profile?.nickName ?: "",
fontSize = 16.sp,
fontWeight = FontWeight.W600,
color = AppColors.text
)
) {
Icon(
painter = painterResource(id = R.drawable.rider_pro_more_horizon),
contentDescription = "",
tint = AppColors.text
)
}
}
}
Spacer(modifier = Modifier.weight(1f))
if (isSelf&&isMain) {
Box(
modifier = Modifier.noRippleClickable {
IndexViewModel.openDrawer = true
}
) {
Box(
modifier = Modifier
.padding(16.dp)
) {
Icon(
painter = painterResource(id = R.drawable.rider_pro_more_horizon),
contentDescription = "",
tint = AppColors.text
)
}
}
}
}
Spacer(modifier = Modifier.height(8.dp))

View File

@@ -16,6 +16,7 @@ fun ProfileWrap(
MyProfileViewModel.loadProfile()
}
ProfileV3(
isMain = true,
onUpdateBanner = { uri, file, context ->
MyProfileViewModel.updateUserProfileBanner(uri, file, context)
},