بهبود طراحی دیالوگ آپدیت و رفع مشکل برش خوردگی دکمهها
Android Release / build (push) Canceled after 1m7s
Android Release / build (push) Canceled after 1m7s
This commit is contained in:
1 parent
6eb9ae8ed6
commit
4dae0d4c0e
2 files changed
+70
-62
No files matched your search
@@ -7,7 +7,6 @@ import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalLayoutDirection
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.LayoutDirection
|
||||
@@ -37,71 +36,81 @@ fun UpdateDialog(
|
||||
.fillMaxWidth()
|
||||
.padding(16.dp)
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(24.dp)
|
||||
.verticalScroll(rememberScrollState())
|
||||
) {
|
||||
Text(
|
||||
text = "بهروزرسانی جدید موجود است",
|
||||
style = MaterialTheme.typography.headlineSmall,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
|
||||
Text(
|
||||
text = "نسخه ${updateInfo.versionName}",
|
||||
style = MaterialTheme.typography.labelLarge,
|
||||
color = Color.Gray
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Text(
|
||||
text = "تغییرات این نسخه:",
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontWeight = FontWeight.SemiBold
|
||||
)
|
||||
|
||||
Text(
|
||||
text = updateInfo.releaseNotes,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
modifier = Modifier.padding(vertical = 8.dp)
|
||||
)
|
||||
|
||||
if (updateInfo.isForceUpdate) {
|
||||
Text(
|
||||
text = "نصب این بهروزرسانی برای ادامه استفاده از برنامه الزامی است.",
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.error,
|
||||
modifier = Modifier.padding(top = 8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||
Column(
|
||||
modifier = Modifier.padding(24.dp)
|
||||
) {
|
||||
Button(
|
||||
onClick = onConfirm,
|
||||
modifier = Modifier.weight(1f),
|
||||
shape = MaterialTheme.shapes.small
|
||||
// Header
|
||||
Text(
|
||||
text = "بهروزرسانی جدید موجود است",
|
||||
style = MaterialTheme.typography.headlineSmall,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
|
||||
Text(
|
||||
text = "نسخه ${updateInfo.versionName}",
|
||||
style = MaterialTheme.typography.labelLarge,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
// Content (Scrollable)
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.weight(1f, fill = false)
|
||||
.verticalScroll(rememberScrollState())
|
||||
) {
|
||||
Text("تایید و بروزرسانی")
|
||||
Text(
|
||||
text = "تغییرات این نسخه:",
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontWeight = FontWeight.SemiBold
|
||||
)
|
||||
|
||||
Text(
|
||||
text = updateInfo.releaseNotes,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
modifier = Modifier.padding(vertical = 8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
if (!updateInfo.isForceUpdate) {
|
||||
|
||||
// Footer
|
||||
if (updateInfo.isForceUpdate) {
|
||||
Text(
|
||||
text = "نصب این بهروزرسانی برای ادامه استفاده از برنامه الزامی است.",
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.error,
|
||||
modifier = Modifier.padding(vertical = 8.dp)
|
||||
)
|
||||
} else {
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
}
|
||||
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(12.dp)
|
||||
) {
|
||||
if (!updateInfo.isForceUpdate) {
|
||||
OutlinedButton(
|
||||
onClick = onDismiss,
|
||||
modifier = Modifier.weight(1f),
|
||||
colors = ButtonDefaults.outlinedButtonColors(contentColor = MaterialTheme.colorScheme.error),
|
||||
border = ButtonDefaults.outlinedButtonBorder.copy(brush = androidx.compose.ui.graphics.SolidColor(MaterialTheme.colorScheme.error)),
|
||||
shape = MaterialTheme.shapes.medium
|
||||
) {
|
||||
Text("بعداً")
|
||||
}
|
||||
}
|
||||
|
||||
Button(
|
||||
onClick = onDismiss,
|
||||
onClick = onConfirm,
|
||||
modifier = Modifier.weight(1f),
|
||||
colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.error),
|
||||
shape = MaterialTheme.shapes.small
|
||||
shape = MaterialTheme.shapes.medium,
|
||||
elevation = ButtonDefaults.buttonElevation(defaultElevation = 2.dp)
|
||||
) {
|
||||
Text("بعداً")
|
||||
Text("تایید و بروزرسانی")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,4 +118,3 @@ fun UpdateDialog(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
"versionCode": 4,
|
||||
"versionName": "1.0.3",
|
||||
"url": "https://github.com/oqba26/MonthlyPaymentApp/releases/download/v1.0.3/MonthlyPaymentApp-v1.0.3.apk",
|
||||
"releaseNotes": "بهروزرسانی به نسخه ۱.۰.۳:\n- بهبود سیستم پرداخت دسته جمعی و اتصال آن به نشانگر بدهی.\n- اضافه شدن قابلیت Pull-to-Refresh به صفحه لیست پرداخت شدهها.\n- بهینهسازی رابط کاربری و حذف دکمههای تکراری.",
|
||||
"releaseNotes": "بهبود طراحی دیالوگ آپدیت و رفع مشکل برش خوردگی دکمهها",
|
||||
"isForceUpdate": false
|
||||
}
|
||||
Reference in new issue
Block a user