This commit is contained in:
moon 2026-05-21 11:05:18 +06:30
commit 0f435192ee
5 changed files with 177 additions and 156 deletions

View File

@ -40,6 +40,8 @@ fun DashboardScreen2(
.fillMaxSize()
.padding(horizontal = 16.dp)
) {
Spacer(modifier = Modifier.height(0.dp))
AdvertisingArea()
Spacer(modifier = Modifier.height(16.dp))
SummaryCard()
Spacer(modifier = Modifier.height(16.dp))
@ -48,13 +50,30 @@ fun DashboardScreen2(
onNavigateSignOn = onNavigateSignOn
)
Spacer(modifier = Modifier.height(18.dp))
RecentTransactionHeader()
// RecentTransactionHeader()
Spacer(modifier = Modifier.height(8.dp))
RecentTransactionList()
// RecentTransactionList()
}
}
}
@Composable
private fun AdvertisingArea() {
Card(
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(0.dp),
colors = CardDefaults.cardColors(containerColor = Color.White),
elevation = CardDefaults.cardElevation(8.dp)
) {
Row(
modifier = Modifier.height(170.dp) ) {
}
}
}
@Composable
private fun SummaryCard() {
Card(
@ -103,7 +122,7 @@ private fun SummaryCard() {
text = "Last Sync",
fontSize = 12.sp,
)
IconCircle(Icons.Default.Sync, Color.CrimsonRed)
// IconCircle(Icons.Default.Sync, Color.CrimsonRed)
}
Spacer(Modifier.height(6.dp))
@ -143,7 +162,7 @@ private fun SummaryItem(
)
Text(subtitle, fontSize = 12.sp)
}
IconCircle(icon, iconBg)
// IconCircle(icon, iconBg)
}
}
@ -242,158 +261,158 @@ private fun MenuCard(
}
}
}
@Composable
private fun RecentTransactionHeader() {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = "Recent Transactions",
color = Color.LegacyRed,
fontSize = 16.sp,
fontWeight = FontWeight.SemiBold,
modifier = Modifier.weight(1f)
)
Text(
text = "View All",
color = Color.LegacyRed,
fontSize = 14.sp
)
Icon(
imageVector = Icons.Default.ChevronRight,
contentDescription = null,
tint = Color.LegacyRed
)
}
}
@Composable
private fun RecentTransactionList() {
Card(
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(14.dp),
colors = CardDefaults.cardColors(containerColor = Color.White),
elevation = CardDefaults.cardElevation(2.dp)
) {
Column {
TransactionRow(
iconText = "VISA",
time = "4:12 PM",
type = "Card Payment",
amount = "MMK 100,000",
status = "Success",
statusColor = Color.LegacyRed,
statusTextColor = Color.LegacyRed
)
Divider(color = Color.LegacyRed)
TransactionRow(
iconText = "MMQR",
time = "8:43 AM",
type = "MMQR",
amount = "MMK 50,000",
status = "Success",
statusColor = Color.LegacyRed,
statusTextColor = Color.LegacyRed
)
Divider(color = Color.LegacyRed)
TransactionRow(
iconText = "MC",
time = "9:10 PM",
type = "Card Payment",
amount = "MMK 150,000",
status = "Failed",
statusColor = Color.LegacyRed,
statusTextColor = Color.LegacyRed
)
}
}
}
@Composable
private fun TransactionRow(
iconText: String,
time: String,
type: String,
amount: String,
status: String,
statusColor: androidx.compose.ui.graphics.Color,
statusTextColor: androidx.compose.ui.graphics.Color
) {
Row(
modifier = Modifier
.fillMaxWidth()
.height(62.dp)
.padding(horizontal = 14.dp),
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = iconText,
color = Color.LegacyRed,
fontWeight = FontWeight.Bold,
fontSize = 20.sp,
modifier = Modifier.width(70.dp)
)
Column(modifier = Modifier.weight(1f)) {
Text(time, fontSize = 12.sp, color = Color.Black)
Text(type, fontSize = 12.sp, color = Color.Gray)
}
Text(
text = amount,
fontSize = 12.sp,
color = Color.Black,
modifier = Modifier.width(90.dp)
)
Box(
modifier = Modifier
.clip(RoundedCornerShape(8.dp))
.padding(horizontal = 10.dp, vertical = 5.dp)
) {
Text(
text = status,
fontSize = 12.sp,
)
}
Icon(
imageVector = Icons.Default.ChevronRight,
contentDescription = null,
tint = Color.LegacyRed,
modifier = Modifier.size(26.dp)
)
}
}
@Composable
private fun IconCircle(
icon: ImageVector,
color: androidx.compose.ui.graphics.Color
) {
Box(
modifier = Modifier
.size(38.dp)
.clip(CircleShape)
.background(color.copy(alpha = 0.1f)),
contentAlignment = Alignment.Center
) {
Icon(
imageVector = icon,
contentDescription = null,
tint = color,
modifier = Modifier.size(22.dp)
)
}
}
//
//@Composable
//private fun RecentTransactionHeader() {
// Row(
// modifier = Modifier.fillMaxWidth(),
// verticalAlignment = Alignment.CenterVertically
// ) {
// Text(
// text = "Recent Transactions",
// color = Color.LegacyRed,
// fontSize = 16.sp,
// fontWeight = FontWeight.SemiBold,
// modifier = Modifier.weight(1f)
// )
//
// Text(
// text = "View All",
// color = Color.LegacyRed,
// fontSize = 14.sp
// )
//
// Icon(
// imageVector = Icons.Default.ChevronRight,
// contentDescription = null,
// tint = Color.LegacyRed
// )
// }
//}
//
//@Composable
//private fun RecentTransactionList() {
// Card(
// modifier = Modifier.fillMaxWidth(),
// shape = RoundedCornerShape(14.dp),
// colors = CardDefaults.cardColors(containerColor = Color.White),
// elevation = CardDefaults.cardElevation(2.dp)
// ) {
// Column {
// TransactionRow(
// iconText = "VISA",
// time = "4:12 PM",
// type = "Card Payment",
// amount = "MMK 100,000",
// status = "Success",
// statusColor = Color.LegacyRed,
// statusTextColor = Color.LegacyRed
// )
//
// Divider(color = Color.LegacyRed)
//
// TransactionRow(
// iconText = "MMQR",
// time = "8:43 AM",
// type = "MMQR",
// amount = "MMK 50,000",
// status = "Success",
// statusColor = Color.LegacyRed,
// statusTextColor = Color.LegacyRed
// )
//
// Divider(color = Color.LegacyRed)
//
// TransactionRow(
// iconText = "MC",
// time = "9:10 PM",
// type = "Card Payment",
// amount = "MMK 150,000",
// status = "Failed",
// statusColor = Color.LegacyRed,
// statusTextColor = Color.LegacyRed
// )
// }
// }
//}
//
//@Composable
//private fun TransactionRow(
// iconText: String,
// time: String,
// type: String,
// amount: String,
// status: String,
// statusColor: androidx.compose.ui.graphics.Color,
// statusTextColor: androidx.compose.ui.graphics.Color
//) {
// Row(
// modifier = Modifier
// .fillMaxWidth()
// .height(62.dp)
// .padding(horizontal = 14.dp),
// verticalAlignment = Alignment.CenterVertically
// ) {
// Text(
// text = iconText,
// color = Color.LegacyRed,
// fontWeight = FontWeight.Bold,
// fontSize = 20.sp,
// modifier = Modifier.width(70.dp)
// )
//
// Column(modifier = Modifier.weight(1f)) {
// Text(time, fontSize = 12.sp, color = Color.Black)
// Text(type, fontSize = 12.sp, color = Color.Gray)
// }
//
// Text(
// text = amount,
// fontSize = 12.sp,
// color = Color.Black,
// modifier = Modifier.width(90.dp)
// )
//
// Box(
// modifier = Modifier
// .clip(RoundedCornerShape(8.dp))
// .padding(horizontal = 10.dp, vertical = 5.dp)
// ) {
// Text(
// text = status,
// fontSize = 12.sp,
// )
// }
//
// Icon(
// imageVector = Icons.Default.ChevronRight,
// contentDescription = null,
// tint = Color.LegacyRed,
// modifier = Modifier.size(26.dp)
// )
// }
//}
//
//@Composable
//private fun IconCircle(
// icon: ImageVector,
// color: androidx.compose.ui.graphics.Color
//) {
// Box(
// modifier = Modifier
// .size(38.dp)
// .clip(CircleShape)
// .background(color.copy(alpha = 0.1f)),
// contentAlignment = Alignment.Center
// ) {
// Icon(
// imageVector = icon,
// contentDescription = null,
// tint = color,
// modifier = Modifier.size(22.dp)
// )
// }
//}
@P2Preview
@Composable

View File

@ -0,0 +1 @@
o/PayLib-release-1.4.64-runtime

View File

@ -0,0 +1 @@
o/sunmiui-1.1.27-runtime