Merge pull request 'dashboard ui changed' (#1) from dev_ptk into dev
Reviewed-on: Dashboard Ui change
This commit is contained in:
commit
10f5bcf355
@ -39,18 +39,37 @@ 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))
|
||||
MenuGrid(onNavigateAmount = onNavigateAmount)
|
||||
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(
|
||||
@ -99,7 +118,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))
|
||||
@ -139,7 +158,7 @@ private fun SummaryItem(
|
||||
)
|
||||
Text(subtitle, fontSize = 12.sp)
|
||||
}
|
||||
IconCircle(icon, iconBg)
|
||||
// IconCircle(icon, iconBg)
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,158 +251,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
|
||||
|
||||
@ -0,0 +1 @@
|
||||
o/PayLib-release-1.4.64-runtime
|
||||
Binary file not shown.
@ -0,0 +1 @@
|
||||
o/sunmiui-1.1.27-runtime
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user