实现了 Agent 和 Profile 数据类,添加了 AddAgent 界面
This commit is contained in:
@@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.layout.wrapContentWidth
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -23,6 +24,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
@@ -77,7 +79,7 @@ fun NoticeScreenHeader(
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.rider_pro_back_icon,),
|
||||
contentDescription = title,
|
||||
modifier = Modifier.size(16.dp).clickable(
|
||||
modifier = Modifier.size(24.dp).clickable(
|
||||
indication = null,
|
||||
interactionSource = remember { MutableInteractionSource() }
|
||||
) {
|
||||
@@ -102,6 +104,52 @@ fun NoticeScreenHeader(
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ScreenHeader(
|
||||
title:String,
|
||||
moreIcon: Boolean = true,
|
||||
rightIcon: @Composable (() -> Unit)? = null
|
||||
) {
|
||||
val nav = LocalNavController.current
|
||||
val AppColors = LocalAppTheme.current
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.rider_pro_close,),
|
||||
contentDescription = title,
|
||||
modifier = Modifier.size(24.dp).clickable(
|
||||
indication = null,
|
||||
interactionSource = remember { MutableInteractionSource() }
|
||||
) {
|
||||
nav.navigateUp()
|
||||
},
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
Spacer(modifier = Modifier.size(12.dp))
|
||||
Text(title,
|
||||
fontWeight = FontWeight.W800,
|
||||
modifier = Modifier.weight(1f),
|
||||
textAlign = TextAlign.Center,
|
||||
fontSize = 17.sp,
|
||||
color = AppColors.text)
|
||||
Spacer(modifier = Modifier.size(12.dp))
|
||||
if (moreIcon) {
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.rider_pro_more_horizon),
|
||||
contentDescription = "More",
|
||||
modifier = Modifier
|
||||
.size(24.dp),
|
||||
)
|
||||
}
|
||||
if (rightIcon != null) {
|
||||
//rightIcon()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun CommentsItem() {
|
||||
Box(
|
||||
|
||||
Reference in New Issue
Block a user