ui: move version tag to top right and add v prefix in update dialog

This commit is contained in:
HALİL İBRAHİM ÖZDEMİR 2026-04-10 17:47:51 +03:00
parent 93112a0c9a
commit c70e803136

View file

@ -170,7 +170,7 @@ fun UpdatePromptDialog(
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
Row(
verticalAlignment = Alignment.CenterVertically,
verticalAlignment = Alignment.Top,
horizontalArrangement = Arrangement.spacedBy(16.dp),
modifier = Modifier.fillMaxWidth()
) {
@ -178,50 +178,14 @@ fun UpdatePromptDialog(
verticalArrangement = Arrangement.spacedBy(4.dp),
modifier = Modifier.weight(1f)
) {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(12.dp)
) {
Text(
text = stringResource(R.string.update_title),
style = MaterialTheme.typography.headlineMedium.copy(
fontWeight = FontWeight.Bold,
letterSpacing = (-0.5).sp
),
color = NuvioColors.TextPrimary
)
if (state.update != null && state.isUpdateAvailable && !showDownloadMode && state.downloadedApkPath == null) {
Box(
modifier = Modifier
.background(
brush = Brush.horizontalGradient(
colors = listOf(
NuvioColors.Primary.copy(alpha = 0.25f),
NuvioColors.Primary.copy(alpha = 0.05f)
)
),
shape = RoundedCornerShape(percent = 50)
)
.border(
width = 1.dp,
color = NuvioColors.Primary.copy(alpha = 0.35f),
shape = RoundedCornerShape(percent = 50)
)
.padding(horizontal = 14.dp, vertical = 6.dp),
contentAlignment = Alignment.Center
) {
Text(
text = state.update.tag,
style = MaterialTheme.typography.labelMedium.copy(
fontWeight = FontWeight.Bold,
letterSpacing = 0.5.sp
),
color = NuvioColors.Primary
)
}
}
}
Text(
text = stringResource(R.string.update_title),
style = MaterialTheme.typography.headlineMedium.copy(
fontWeight = FontWeight.Bold,
letterSpacing = (-0.5).sp
),
color = NuvioColors.TextPrimary
)
val subtitle = when {
state.errorMessage != null -> state.errorMessage
@ -241,6 +205,26 @@ fun UpdatePromptDialog(
)
}
}
if (state.update != null && state.isUpdateAvailable && !showDownloadMode && state.downloadedApkPath == null) {
Box(
modifier = Modifier.padding(top = 8.dp)
) {
val displayTag = if (state.update.tag.startsWith("v", ignoreCase = true)) {
state.update.tag
} else {
"v${state.update.tag}"
}
Text(
text = displayTag,
style = MaterialTheme.typography.bodyMedium.copy(
fontWeight = FontWeight.SemiBold,
letterSpacing = 1.sp
),
color = NuvioColors.TextSecondary.copy(alpha = 0.75f)
)
}
}
}
val rawNotes = state.update?.notes